Add a kludge to the compare tool for unicode filenames
authorIan Lynagh <ian@well-typed.com>
Sun, 27 Jan 2013 16:26:35 +0000 (16:26 +0000)
committerIan Lynagh <ian@well-typed.com>
Sun, 27 Jan 2013 16:26:35 +0000 (16:26 +0000)
It thought that something impossible was happening when they
were involved.

distrib/compare/FilenameDescr.hs

index 37fd499..a0f53fd 100644 (file)
@@ -1,6 +1,7 @@
 
 module FilenameDescr where
 
+import Data.Char
 import Data.Either
 import Data.List
 
@@ -32,7 +33,11 @@ checkContent buildInfo (fd, tl)
       Right fn' ->
           if fn' == fn
           then []
-          else ["checkContent: Can't happen: filename mismatch: " ++ show fn]
+          else if all isAscii fn
+               then ["checkContent: Can't happen: filename mismatch: "
+                  ++ show fn]
+               else [] -- Ugly kludge; don't worry too much if filepaths
+                       -- containing non-ASCII chars have gone wrong
       Left errs ->
           errs