gameServer/OfficialServer/GameReplayStore.hs
changeset 11341 e6e748d021d0
parent 11320 556eafd1443a
--- a/gameServer/OfficialServer/GameReplayStore.hs	Mon Nov 09 18:03:47 2015 +0000
+++ b/gameServer/OfficialServer/GameReplayStore.hs	Mon Nov 09 21:09:51 2015 +0300
@@ -38,13 +38,13 @@
 
 pickReplayFile :: Int -> [String] -> IO String
 pickReplayFile p blackList = do
-    files <- liftM (filter (\f -> sameProto f && notBlacklisted f)) $ getDirectoryContents "replays"
+    files <- liftM (filter (\f -> sameProto f && notBlacklisted ("replays/" ++ f))) $ getDirectoryContents "replays"
     if (not $ null files) then
         return $ "replays/" ++ head files
         else
         return ""
     where
-        sameProto = (isSuffixOf ('.' : show p))
+        sameProto = isSuffixOf ('.' : show p)
         notBlacklisted = flip notElem blackList
 
 saveReplay :: RoomInfo -> IO ()