diff --git a/PBGitConfig.m b/PBGitConfig.m index 8b51013..3d4f156 100644 --- a/PBGitConfig.m +++ b/PBGitConfig.m @@ -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]; diff --git a/PBGitRepository.m b/PBGitRepository.m index d526a59..a4a5880 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -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