зеркало из https://github.com/microsoft/git.git
diff.c: don't add extra '/' to pathname
The "base" string already contains any finishing "/", so the way to get the full pathname is to just concatenate the base and path directly, with no extra slashes in between.
This commit is contained in:
Родитель
c9cddabe99
Коммит
4765dd57e6
2
diff.c
2
diff.c
|
@ -256,7 +256,6 @@ void diff_addremove(int addremove, unsigned mode,
|
|||
|
||||
if (path) {
|
||||
strcpy(concatpath, base);
|
||||
strcat(concatpath, "/");
|
||||
strcat(concatpath, path);
|
||||
}
|
||||
run_external_diff(path ? concatpath : base, one, two);
|
||||
|
@ -278,7 +277,6 @@ void diff_change(unsigned old_mode, unsigned new_mode,
|
|||
|
||||
if (path) {
|
||||
strcpy(concatpath, base);
|
||||
strcat(concatpath, "/");
|
||||
strcat(concatpath, path);
|
||||
}
|
||||
run_external_diff(path ? concatpath : base, &spec[0], &spec[1]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче