cvs: TSRM / tsrm_virtual_cwd.h

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

  Modified files:              
    /TSRM	tsrm_virtual_cwd.h 
  Log:
  - MF53: 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.66&r2=1.67&diff_format=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.66 TSRM/tsrm_virtual_cwd.h:1.67
--- TSRM/tsrm_virtual_cwd.h:1.66	Thu Apr 24 07:46:10 2008
+++ TSRM/tsrm_virtual_cwd.h	Fri May  2 14:08:44 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: tsrm_virtual_cwd.h,v 1.66 2008/04/24 07:46:10 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.67 2008/05/02 14:08:44 derick Exp $ */
 
 #ifndef VIRTUAL_CWD_H
 #define VIRTUAL_CWD_H
@@ -299,7 +299,7 @@
 #if defined(TSRM_WIN32)
 # define VCWD_RENAME(oldname, newname) MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING)
 #else
-# define VCWD_RENAME(oldname, newname) rename(oldname, newname)
+# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) == 0 ? -1 : 0)
 #endif
 #define VCWD_CHDIR(path) chdir(path)
 #define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
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.