summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/fs.c b/fs/fs.c
index ca4fe70e15..92f336b821 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -99,13 +99,13 @@ char *normalise_path(const char *pathname)
slashes[0] = in = out = path;
- while (*in) {
- if(*in == '/') {
+ while (*in) {
+ if(*in == '/') {
slashes[sl++] = out;
- *out++ = *in++;
- while(*in == '/')
- in++;
- } else {
+ *out++ = *in++;
+ while(*in == '/')
+ in++;
+ } else {
if (*in == '.' && (*(in + 1) == '/' || !*(in + 1))) {
sl--;
if (sl < 0)
@@ -123,16 +123,16 @@ char *normalise_path(const char *pathname)
continue;
}
*out++ = *in++;
- }
- }
+ }
+ }
*out-- = 0;
- /*
- * Remove trailing slash
- */
- if (*out == '/')
- *out = 0;
+ /*
+ * Remove trailing slash
+ */
+ if (*out == '/')
+ *out = 0;
if (!*path) {
*path = '/';