aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2020-10-03 18:25:53 +0200
committerOmar Polo <op@omarpolo.com>2020-10-03 18:25:53 +0200
commit67328d238c1718f1f511e847d8375ea23fb99661 (patch)
tree2e555e93b48d94d7244562f57fc951545e077fc4
parent4d4f0e19acf862d139c9864de8510c21b5538e9c (diff)
correct the ../ removal function
was copying BEFORE and not AFTER the ../.
-rw-r--r--gmid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmid.c b/gmid.c
index aee8df8..5a1aa89 100644
--- a/gmid.c
+++ b/gmid.c
@@ -124,7 +124,7 @@ adjust_path(char *path)
while (1) {
if ((s = strstr(path, "../")) == NULL)
return;
- memmove(s - 3, s, strlen(s)+1); /* copy also the \0 */
+ memmove(s, s+3, strlen(s)+1); /* copy also the \0 */
}
}