cvs: TSRM(PHP_5_3) / tsrm_virtual_cwd.h

[email protected] ("Derick Rethans")
Newsgroups php.zend-engine.cvs
Message-ID <cvsderick1209737246@cvsserver>
derick		Fri May  2 14:07:26 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /TSRM	tsrm_virtual_cwd.h 
  Log:
  - Fix for bug #44870: rename() on directory deletes same named file. (Patch by
    Pierre)
  
  
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.h?r1=1.48.2.5.2.8.2.3&r2=1.48.2.5.2.8.2.4&diff_format=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.3 TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.4
--- TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.3	Thu Apr 24 07:45:01 2008
+++ TSRM/tsrm_virtual_cwd.h	Fri May  2 14:07:26 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.3 2008/04/24 07:45:01 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.4 2008/05/02 14:07:26 derick Exp $ */
 
 #ifndef VIRTUAL_CWD_H
 #define VIRTUAL_CWD_H
@@ -280,7 +280,7 @@
 /* rename on windows will fail if newname already exists.
    MoveFileEx has to be used */
 #if defined(TSRM_WIN32)
-# define VCWD_RENAME(oldname, newname) MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING)
+# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) == 0 ? -1 : 0)
 #else
 # define VCWD_RENAME(oldname, newname) rename(oldname, newname)
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.