Index: src/file.c
==================================================================
--- src/file.c
+++ src/file.c
@@ -523,12 +523,10 @@
             /* Unicode character in the range U+D800 - U+DFFF are for
              * surrogate pairs, they shouldn't occur in filenames. */
             return 0;
           }
         }
-      }else if( c=='\\' ){
-        return 0;
       }
     }
     if( c=='/' ){
       if( z[i+1]=='/' ) return 0;
       if( z[i+1]=='.' ){
@@ -769,12 +767,12 @@
 }
 
 /*
 ** Return TRUE if the given filename is canonical.
 **
-** Canonical names are full pathnames using "/" not "\" and which
-** contain no "/./" or "/../" terms.
+** Canonical names are full pathnames using "/" not "\" (on Windows)
+** and which contain no "/./" or "/../" terms.
 */
 int file_is_canonical(const char *z){
   int i;
   if( z[0]!='/'
 #if defined(_WIN32)
@@ -781,11 +779,13 @@
     && (z[0]==0 || z[1]!=':' || z[2]!='/')
 #endif
   ) return 0;
 
   for(i=0; z[i]; i++){
+#if defined(_WIN32)
     if( z[i]=='\\' ) return 0;
+#endif
     if( z[i]=='/' ){
       if( z[i+1]=='.' ){
         if( z[i+2]=='/' || z[i+2]==0 ) return 0;
         if( z[i+2]=='.' && (z[i+3]=='/' || z[i+3]==0) ) return 0;
       }