- Timestamp:
- Oct 24, 2014, 12:35:09 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/kNIX/os2/b_fsRename.c
r3862 r3905 144 144 * to retry the move operation and handle races with other 145 145 * processes somewhat ok... 146 * 147 * Try clear the read-only attribute on files before deleting them. 148 * Directories cannot have read-only attributes on OS/2 it seems. 146 149 */ 147 150 if (fsts3New.attrFile & FILE_DIRECTORY) … … 151 154 if (!rc2) 152 155 continue; 153 elseif (rc2 == ERROR_ACCESS_DENIED)156 if (rc2 == ERROR_ACCESS_DENIED) 154 157 rc = -ENOTEMPTY; 155 158 else … … 158 161 else 159 162 { 163 if (fsts3New.attrFile & FILE_READONLY) 164 { 165 fsts3New.attrFile &= ~FILE_READONLY; 166 rc2 = DosSetPathInfo((PCSZ)&szNativePathNew[0], FIL_STANDARD, &fsts3New, 167 sizeof(fsts3New), 0 /*fOptions*/); 168 LIBCLOG_MSG("DosSetPathInfo('%s',read-write) -> %d\n", szNativePathNew, rc2); 169 } 170 160 171 rc2 = DosDelete((PCSZ)&szNativePathNew[0]); 161 172 LIBCLOG_MSG("DosDelete('%s') -> %d\n", szNativePathNew, rc2); 162 173 if (!rc2) 163 174 continue; 164 else 165 rc = -__libc_back_native2errno(rc2); 175 rc = -__libc_back_native2errno(rc2); 166 176 } 167 177 }
Note:
See TracChangeset
for help on using the changeset viewer.