diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs index 8d92fe179..ee7b7326f 100644 --- a/src/compiler/GFServer.hs +++ b/src/compiler/GFServer.hs @@ -180,8 +180,7 @@ handle state0 cache execute1 return (state,json200 (jsonresult cwd ('/':dir++"/") cmd out files)) upload files = - do let update (name,contents)= updateFile name contents - mapM_ update files + do mapM_ (uncurry updateFile) files return (state,resp204) jsonList = @@ -354,8 +353,9 @@ contentTypeFromExt ext = bin t = (t,readBinaryFile) -- * IO utilities -updateFile path new = +updateFile path new0 = do old <- try $ readBinaryFile path + let new = encodeString new0 when (Right new/=old) $ do logPutStrLn $ "Updating "++path seq (either (const 0) length old) $ writeBinaryFile path new diff --git a/src/www/gfse/TODO b/src/www/gfse/TODO index 42445e399..c976c9d2c 100644 --- a/src/www/gfse/TODO +++ b/src/www/gfse/TODO @@ -40,7 +40,3 @@ + Bug! The startcat menu shows the first category by default, but the startcat flag is actually not set until a selection is made from the menu. - -- Bug! In Opera it seems that grammars are sent with the wrong character - encoding to the server, preventing grammars containing ÅÄÖ or other non-ASCII - characters from working.