Fix file path construction when using NSString

This commit is contained in:
Rick Berry
2009-01-17 15:06:25 +00:00
committed by Pieter de Bie
parent feb0b64f29
commit 40cceebc9b
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -32,7 +32,7 @@
[array addObject:@"--global"];
else {
[array addObject:@"-f"];
[array addObject:[repositoryPath stringByAppendingString:@"/config"]];
[array addObject:[repositoryPath stringByAppendingPathComponent:@"config"]];
}
[array addObject:key];
@@ -69,7 +69,7 @@
// Check if the config option is local. In that case,
// write it local
if (repositoryPath) {
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"config", @"-f", [repositoryPath stringByAppendingString:@"/config"], @"--get", path, nil];
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"config", @"-f", [repositoryPath stringByAppendingPathComponent:@"config"], @"--get", path, nil];
int ret;
[PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:arguments inDir:nil retValue:&ret];
+1 -2
View File
@@ -158,8 +158,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
// Get the .gitignore file at the root of the repository
- (NSString*)gitIgnoreFilename
{
NSString *dir = [self workingDirectory];
return [dir stringByAppendingString:@"/.gitignore"];
return [[self workingDirectory] stringByAppendingPathComponent:@".gitignore"];
}
// Overridden to create our custom window controller