Use IRIs instead of paths

FossilOrigin-Name: 91e2a5071199dc8d87735ad50ee74a6ce030c22f1bb0d70668bef172384dcde3
This commit is contained in:
Jonathan Schleifer 2024-08-11 11:48:19 +00:00
parent 5c91e6f832
commit bd3543537b
5 changed files with 53 additions and 55 deletions

View file

@ -19,7 +19,7 @@
#import "SL3OpenFailedException.h"
@implementation SL3OpenFailedException
@synthesize path = _path, flags = _flags;
@synthesize IRI = _IRI, flags = _flags;
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
@ -27,13 +27,13 @@
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithPath: (OFString *)path
flags: (int)flags
errorCode: (int)errorCode
+ (instancetype)exceptionWithIRI: (OFIRI *)IRI
flags: (int)flags
errorCode: (int)errorCode
{
return [[[self alloc] initWithPath: path
flags: flags
errorCode: errorCode] autorelease];
return [[[self alloc] initWithIRI: IRI
flags: flags
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
@ -42,15 +42,15 @@
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithPath: (OFString *)path
flags: (int)flags
errorCode: (int)errorCode
- (instancetype)initWithIRI: (OFIRI *)IRI
flags: (int)flags
errorCode: (int)errorCode
{
self = [super initWithConnection: nil
errorCode: errorCode];
@try {
_path = [path copy];
_IRI = [IRI copy];
_flags = flags;
} @catch (id e) {
[self release];
@ -62,7 +62,7 @@
- (void)dealloc
{
[_path release];
[_IRI release];
[super dealloc];
}