Oops, forgot path
authorunc0rr
Sun, 10 Feb 2013 22:58:16 +0400 (2013-02-10)
changeset 8495 f1223400b473
parent 8494 53b91a602955
child 8496 a06b1598c3a2
Oops, forgot path
gameServer/OfficialServer/GameReplayStore.hs
--- a/gameServer/OfficialServer/GameReplayStore.hs	Sun Feb 10 09:50:09 2013 -0500
+++ b/gameServer/OfficialServer/GameReplayStore.hs	Sun Feb 10 22:58:16 2013 +0400
@@ -34,11 +34,11 @@
 loadReplay p = E.handle (\(e :: SomeException) -> warningM "REPLAYS" "Problems reading replay" >> return []) $ do
     files <- liftM (filter (isSuffixOf ('.' : show p))) $ getDirectoryContents "replays"
     if (not $ null files) then
-        loadFile $ head files
+        loadFile $ "replays/" ++ head files
         else
         return []
     where
         loadFile :: String -> IO [B.ByteString]
-        loadFile fileName = E.handle (\(e :: SomeException) -> warningM "REPLAYS" ("Problems reading " ++ fileName) >> return []) $ do
+        loadFile fileName = E.handle (\(e :: SomeException) -> warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return []) $ do
             (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName
             return $ replayToDemo teams (Map.fromList params1) (Map.fromList params2) roundMsgs