Differences From Artifact [c6a9166c97]:
- File
src/OFFile.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 17041) [annotate] [blame] [check-ins using]
To Artifact [3604f250d5]:
- File src/OFFile.m — part of check-in [9e82f99f09] at 2011-09-28 14:38:45 on branch trunk — Various small bugfixes. (user: js, size: 17245) [annotate] [blame] [check-ins using]
︙ | |||
277 278 279 280 281 282 283 | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - - + + + - + + | #else HANDLE handle; WIN32_FIND_DATA fd; pool = [[OFAutoreleasePool alloc] init]; path = [path stringByAppendingString: @"\\*"]; |
︙ | |||
331 332 333 334 335 336 337 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - + + - + + | # ifndef _WIN32 if (chmod([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], mode)) @throw [OFChangeFileModeFailedException exceptionWithClass: self path: path mode: mode]; # else |
︙ | |||
470 471 472 473 474 475 476 477 478 479 480 481 482 483 | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | + + | if (!override) { struct stat s; if (fstat(sourceFile->fileDescriptor, &s) == 0) fchmod(destinationFile->fileDescriptor, s.st_mode); } #else (void)override; #endif } @finally { [sourceFile close]; [destinationFile close]; free(buffer); } |
︙ |