diff options
author | Omar Polo <op@omarpolo.com> | 2020-10-03 18:25:53 +0200 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2020-10-03 18:25:53 +0200 |
commit | 67328d238c1718f1f511e847d8375ea23fb99661 (patch) | |
tree | 2e555e93b48d94d7244562f57fc951545e077fc4 | |
parent | 4d4f0e19acf862d139c9864de8510c21b5538e9c (diff) |
correct the ../ removal function
was copying BEFORE and not AFTER the ../.
-rw-r--r-- | gmid.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ } } |