replace_forbidden_characters(): Use different character
authorEric Biggers <ebiggers3@gmail.com>
Thu, 25 Apr 2013 03:16:40 +0000 (22:16 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 25 Apr 2013 03:16:40 +0000 (22:16 -0500)
src/dentry.c

index 698e137..c17e45a 100644 (file)
@@ -1275,14 +1275,18 @@ replace_forbidden_characters(utf16lechar *name)
                if (*p == '/')
        #endif
                {
                if (*p == '/')
        #endif
                {
+               #ifdef __WIN32__
+                       *p = cpu_to_le16(0xfffd);
+               #else
+                       *p = '?';
+               #endif
                        if (name) {
                                WARNING("File, directory, or stream name \"%"WS"\"\n"
                                        "          contains forbidden characters; "
                        if (name) {
                                WARNING("File, directory, or stream name \"%"WS"\"\n"
                                        "          contains forbidden characters; "
-                                       "replacing them with Unicode codepoint U+001A",
+                                       "substituting replacement characters.",
                                        name);
                                name = NULL;
                        }
                                        name);
                                name = NULL;
                        }
-                       *p = 0x1a;
                }
        }
 }
                }
        }
 }