ObjFW  Diff

Differences From Artifact [4ba08a7ab6]:

To Artifact [7b7c6c2f3c]:


18
19
20
21
22
23
24
25
26
27
28
29
30





31
32
33
34
35
36
37

#include <stdlib.h>
#include <string.h>

#import "OFURL.h"
#import "OFURL+Private.h"
#import "OFArray.h"
#ifdef OF_HAVE_FILES
# import "OFFileManager.h"
#endif
#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"






#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"

static OFCharacterSet *URLAllowedCharacterSet = nil;
static OFCharacterSet *URLPathAllowedCharacterSet = nil;







<
<
<



>
>
>
>
>







18
19
20
21
22
23
24



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

#include <stdlib.h>
#include <string.h>

#import "OFURL.h"
#import "OFURL+Private.h"
#import "OFArray.h"



#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"

#ifdef OF_HAVE_FILES
# import "OFFileManager.h"
# import "OFURLHandler_file.h"
#endif

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"

static OFCharacterSet *URLAllowedCharacterSet = nil;
static OFCharacterSet *URLPathAllowedCharacterSet = nil;
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
}

#ifdef OF_HAVE_FILES
- (instancetype)initFileURLWithPath: (OFString *)path
{
	@try {
		void *pool = objc_autoreleasePoolPush();
		OFFileManager *fileManager = [OFFileManager defaultManager];
		bool isDirectory;

		isDirectory = ([path hasSuffix: OF_PATH_DELIMITER_STRING] ||
		    [fileManager directoryExistsAtPath: path]);
		self = [self initFileURLWithPath: path
				     isDirectory: isDirectory];

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
		@throw e;







<



|







505
506
507
508
509
510
511

512
513
514
515
516
517
518
519
520
521
522
}

#ifdef OF_HAVE_FILES
- (instancetype)initFileURLWithPath: (OFString *)path
{
	@try {
		void *pool = objc_autoreleasePoolPush();

		bool isDirectory;

		isDirectory = ([path hasSuffix: OF_PATH_DELIMITER_STRING] ||
		    [OFURLHandler_file of_directoryExistsAtPath: path]);
		self = [self initFileURLWithPath: path
				     isDirectory: isDirectory];

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
		@throw e;