Changeset 379 for trunk/orca
- Timestamp:
- 04/03/07 17:37:23 (20 months ago)
- Files:
-
- 1 modified
-
trunk/orca/stdio.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/stdio.c
r94 r379 69 69 70 70 71 #ifdef _WIN32 72 extern int orIsDir( const char* path ); 73 #endif 74 71 75 OR_NATIVE_PUB( orRenameNative ) 72 76 { … … 87 91 cp2 = orStrChars( str2, a2 ); 88 92 93 #ifdef _WIN32 94 // We want Unix rename overwrite behavior. 95 if( orIsDir() == 0 ) 96 { 97 if( remove( cp2 ) == -1 ) 98 { 99 orErrorT( OR_ERROR_ACCESS, "remove() %s", strerror(errno) ); 100 return; 101 } 102 } 103 #endif 104 89 105 ok = rename( cp1, cp2 ); 90 106 if( ok != 0 ) 91 107 { 92 orErrorT( OR_ERROR_ACCESS, "rename() error %d", errno);108 orErrorT( OR_ERROR_ACCESS, "rename() %s", strerror(errno) ); 93 109 return; 94 110 }
