MoveFileEx patch

Ove Kaaven ovehk at ping.uio.no
Sun Sep 30 07:33:53 CDT 2001


Looks to me like InstallShield at some point explicitly calls
MoveFileExA(NULL, NULL, MOVEFILE_DELAY_REBOOT) and checks for an
ERROR_CALL_NOT_IMPLEMENTED error to find out if the operation is
supported.

Log:
Ove Kaaven <ovek at transgaming.com>
Make MoveFileEx fail with ERROR_INVALID_PARAMETER (better than crashing)
when the source file operand is NULL.

Index: files/file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.109
diff -u -r1.109 file.c
--- files/file.c	2001/09/25 22:37:32	1.109
+++ files/file.c	2001/09/30 11:09:15
@@ -2006,6 +2006,11 @@
 
     TRACE("(%s,%s,%04lx)\n", fn1, fn2, flag);
 
+    if (!fn1) {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return FALSE;
+    }
+
     if (!DOSFS_GetFullName( fn1, TRUE, &full_name1 )) return FALSE;
 
     if (fn2)  /* !fn2 means delete fn1 */





More information about the wine-patches mailing list