gameServer/OfficialServer/GameReplayStore.hs
changeset 11320 556eafd1443a
parent 11250 09a2d3988569
child 11336 e6e748d021d0
--- a/gameServer/OfficialServer/GameReplayStore.hs	Sat Nov 07 21:01:04 2015 +0100
+++ b/gameServer/OfficialServer/GameReplayStore.hs	Sat Nov 07 23:44:49 2015 +0300
@@ -70,11 +70,11 @@
     where
         loadFile :: String -> IO (Maybe CheckInfo, [B.ByteString])
         loadFile fileName = E.handle (\(e :: SomeException) ->
-                    warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Just $ CheckInfo fileName [] "", [])) $ do
+                    warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Just $ CheckInfo fileName [] Nothing, [])) $ do
             (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName
             let d = replayToDemo teams (Map.fromList params1) (Map.fromList params2) (reverse roundMsgs)
             d `deepseq` return $ (
-                Just (CheckInfo fileName teams (head $ fst d))
+                Just (CheckInfo fileName teams (fst d))
                 , snd d
                 )