We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ba97e commit 3bbb298Copy full SHA for 3bbb298
lockfile.c
@@ -19,14 +19,14 @@ static void trim_last_path_component(struct strbuf *path)
19
int i = path->len;
20
21
/* back up past trailing slashes, if any */
22
- while (i && path->buf[i - 1] == '/')
+ while (i && is_dir_sep(path->buf[i - 1]))
23
i--;
24
25
/*
26
* then go backwards until a slash, or the beginning of the
27
* string
28
*/
29
- while (i && path->buf[i - 1] != '/')
+ while (i && !is_dir_sep(path->buf[i - 1]))
30
31
32
strbuf_setlen(path, i);
0 commit comments