--- 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