Changeset 3905
- Timestamp:
- Oct 24, 2014, 12:35:09 AM (11 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/sys/b_fsRename.c
r2254 r3905 156 156 * to retry the move operation and handle races with other 157 157 * processes somewhat ok... 158 * 159 * Try clear the read-only attribute on files before deleting them. 160 * Directories cannot have read-only attributes on OS/2 it seems. 158 161 */ 159 162 if (fsts3New.attrFile & FILE_DIRECTORY) … … 163 166 if (!rc2) 164 167 continue; 165 elseif (rc2 == ERROR_ACCESS_DENIED)168 if (rc2 == ERROR_ACCESS_DENIED) 166 169 rc = -ENOTEMPTY; 167 170 else … … 170 173 else 171 174 { 175 if (fsts3New.attrFile & FILE_READONLY) 176 { 177 fsts3New.attrFile &= ~FILE_READONLY; 178 rc2 = DosSetPathInfo((PCSZ)&szNativePathNew[0], FIL_STANDARD, &fsts3New, 179 sizeof(fsts3New), 0 /*fOptions*/); 180 LIBCLOG_MSG("DosSetPathInfo('%s',read-write) -> %d\n", szNativePathNew, rc2); 181 } 182 172 183 rc2 = DosDelete((PCSZ)&szNativePathNew[0]); 173 184 LIBCLOG_MSG("DosDelete('%s') -> %d\n", szNativePathNew, rc2); 174 185 if (!rc2) 175 186 continue; 176 else 177 rc = -__libc_native2errno(rc2); 187 rc = -__libc_native2errno(rc2); 178 188 } 179 189 } -
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.