+static void
+replace_forbidden_characters(utf16lechar *name)
+{
+ utf16lechar *p;
+
+ for (p = name; *p; p++) {
+ #ifdef __WIN32__
+ if (wcschr(L"<>:\"/\\|?*", (wchar_t)*p))
+ #else
+ if (*p == '/') {
+ #endif
+ if (name) {
+ WARNING("File, directory, or stream name \"%"WS"\"\n"
+ " contains forbidden characters; "
+ "replacing them with Unicode codepoint U+001A",
+ name);
+ name = NULL;
+ }
+ *p = 0x1a;
+ }
+ }
+}
+