aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/w32.c b/src/w32.c
index efc0bb5511c..abf2db6580b 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1807,7 +1807,7 @@ sys_open (const char * path, int oflag, int mode)
1807int 1807int
1808sys_rename (const char * oldname, const char * newname) 1808sys_rename (const char * oldname, const char * newname)
1809{ 1809{
1810 int result; 1810 BOOL result;
1811 char temp[MAX_PATH]; 1811 char temp[MAX_PATH];
1812 1812
1813 /* MoveFile on Windows 95 doesn't correctly change the short file name 1813 /* MoveFile on Windows 95 doesn't correctly change the short file name
@@ -1851,7 +1851,7 @@ sys_rename (const char * oldname, const char * newname)
1851 result = rename (oldname, temp); 1851 result = rename (oldname, temp);
1852 } 1852 }
1853 /* This loop must surely terminate! */ 1853 /* This loop must surely terminate! */
1854 while (result < 0 && (errno == EEXIST || errno == EACCES)); 1854 while (result < 0 && errno == EEXIST);
1855 if (result < 0) 1855 if (result < 0)
1856 return -1; 1856 return -1;
1857 } 1857 }
@@ -1871,7 +1871,7 @@ sys_rename (const char * oldname, const char * newname)
1871 result = rename (temp, newname); 1871 result = rename (temp, newname);
1872 1872
1873 if (result < 0 1873 if (result < 0
1874 && (errno == EEXIST || errno == EACCES) 1874 && errno == EEXIST
1875 && _chmod (newname, 0666) == 0 1875 && _chmod (newname, 0666) == 0
1876 && _unlink (newname) == 0) 1876 && _unlink (newname) == 0)
1877 result = rename (temp, newname); 1877 result = rename (temp, newname);