Fix to protect users from selves.

Guy L. Albertelli galberte at neo.lrun.com
Sat Sep 28 21:35:42 CDT 2002


This will eliminate attempts to rename directories to !$!$!$... like Explorer.exe likes to do doing install processing. This is
mainly to protect users from themselves.

License: X11

Changelog:
Guy Albertelli  <<galberte at neo.lrun.com>>

  files/file.c
    -  Prevent Explorer.exe from renaming directories to !$!$...
-------------- next part --------------
Index: files/file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.165
diff -u -r1.165 file.c
--- files/file.c	17 Sep 2002 01:27:55 -0000	1.165
+++ files/file.c	29 Sep 2002 02:05:55 -0000
@@ -2728,6 +2728,16 @@
                 return FALSE;
             }
         }
+
+	/**** Detect normal Explorer.exe directory corruption ****/
+	if (strstr(full_name2.long_name, "!$!$") != NULL) {
+	    ERR("Attempting to rename <%s> to <%s>\n",
+		full_name1.long_name, full_name2.long_name);
+	    ERR("Found attempt to make bad directory!!!! Aborted!\n");
+	    SetLastError( ERROR_BAD_FORMAT );
+	    return FALSE;
+	}
+
         if (rename( full_name1.long_name, full_name2.long_name ) == -1)
             /* Try copy/delete unless it's a directory. */
             /* FIXME: This does not handle the (unlikely) case that the two locations


More information about the wine-patches mailing list