Revision b58ff732 pithos-macos/PithosAccount.m
b/pithos-macos/PithosAccount.m | ||
---|---|---|
60 | 60 |
PithosAccount *pithosAccount = [[[self alloc] init] autorelease]; |
61 | 61 |
pithosAccount.uniqueName = [NSString stringWithFormat:@"pithosAccount-%f", [NSDate timeIntervalSinceReferenceDate]]; |
62 | 62 |
pithosAccount.syncSkipHidden = YES; |
63 |
pithosAccount.versionResource = [NSString stringWithString:@"v1"];
|
|
64 |
pithosAccount.loginResource = [NSString stringWithString:@"login"];
|
|
63 |
pithosAccount.versionResource = @"v1";
|
|
64 |
pithosAccount.loginResource = @"login";
|
|
65 | 65 |
return pithosAccount; |
66 | 66 |
} |
67 | 67 |
|
... | ... | |
112 | 112 |
if (![name length]) { |
113 | 113 |
[name release]; |
114 | 114 |
NSDictionary *pithosAccountsDictionary = [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] pithosAccountsDictionary]; |
115 |
NSString *namePrefix = [NSString stringWithString:@"okeanos"];
|
|
115 |
NSString *namePrefix = @"okeanos";
|
|
116 | 116 |
NSUInteger nameSuffix = 1; |
117 |
name = [NSString stringWithString:@"okeanos"];
|
|
117 |
name = @"okeanos";
|
|
118 | 118 |
NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; |
119 | 119 |
NSFileManager *fileManager = [NSFileManager defaultManager]; |
120 | 120 |
while ([pithosAccountsDictionary objectForKey:name] || |
121 | 121 |
[fileManager fileExistsAtPath:[documentsDirectoryPath stringByAppendingPathComponent:name]]) { |
122 |
name = [NSString stringWithFormat:@"%@%d", namePrefix, ++nameSuffix]; |
|
122 |
name = [NSString stringWithFormat:@"%@%ld", namePrefix, ++nameSuffix];
|
|
123 | 123 |
} |
124 | 124 |
[name retain]; |
125 | 125 |
} |
... | ... | |
233 | 233 |
- (NSString *)serverURL { |
234 | 234 |
if (![self urlIsValid:serverURL]) { |
235 | 235 |
[serverURL release]; |
236 |
serverURL = [[NSString stringWithString:@"https://pithos.okeanos.grnet.gr"] retain];
|
|
236 |
serverURL = [@"https://pithos.okeanos.grnet.gr" retain];
|
|
237 | 237 |
} |
238 | 238 |
return serverURL; |
239 | 239 |
} |
Also available in: Unified diff