Skip to content

Commit

Permalink
Escape paths to prevent them from being recognized as match patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
lapfelix committed Jan 27, 2020
1 parent b12d1ce commit df25dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitUpKit/Core/GCIndex.m
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ - (BOOL)checkoutFilesToWorkingDirectory:(NSArray<NSString*>*)paths fromIndex:(GC
char** pathStrings = malloc(paths.count * sizeof(char*));
options.paths.strings = pathStrings;
for (NSUInteger i = 0; i < paths.count; i++) {
const char* filePath = GCGitPathFromFileSystemPath(paths[i]);
const char* filePath = GCGitPathFromFileSystemPath([NSRegularExpression escapedPatternForString:paths[i]]);
options.paths.strings[i] = (char*)filePath;
}

Expand Down

0 comments on commit df25dac

Please sign in to comment.