Differences From Artifact [cedacc51c1]:
- File
src/OFFileManager.m
— part of check-in
[ad3fc136ba]
at
2018-10-21 18:54:48
on branch trunk
— OFURLHandler: Do not depend on OFFileManager
This fixes --disable-files. (user: js, size: 19363) [annotate] [blame] [check-ins using]
To Artifact [1b81151f42]:
- File src/OFFileManager.m — part of check-in [dec64f3a50] at 2018-11-04 17:51:29 on branch trunk — ofarc: Use OFSandbox's new unveiling (user: js, size: 19969) [annotate] [blame] [check-ins using]
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | + | #import "OFString.h" #import "OFSystemInfo.h" #import "OFURL.h" #import "OFURLHandler.h" #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFCopyItemFailedException.h" #import "OFCreateDirectoryFailedException.h" #import "OFGetCurrentDirectoryPathFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMoveItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFRemoveItemFailedException.h" |
︙ | |||
316 317 318 319 320 321 322 323 324 325 326 327 328 329 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | + + + + + + + + + + + + + + + + + + + + + + | if (URL == nil) @throw [OFInvalidArgumentException exception]; if (!createParents) { [self createDirectoryAtURL: URL]; return; } /* * Try blindly creating the directory first. * * The reason for this is that we might be sandboxed, so attempting to * create any of the parent directories will fail, while creating the * directory itself will work. */ if ([self directoryExistsAtURL: URL]) return; @try { [self createDirectoryAtURL: URL]; return; } @catch (OFCreateDirectoryFailedException *e) { /* * If we didn't fail because any of the parents is missing, * there is no point in trying to create the parents. */ if ([e errNo] != ENOENT) @throw e; } components = [[URL URLEncodedPath] componentsSeparatedByString: @"/"]; for (OFString *component in components) { if (currentPath != nil) currentPath = [currentPath stringByAppendingFormat: @"/%@", component]; |
︙ |