Added comment
authormarkus schnalke <meillo@marmaro.de>
Sun, 20 Nov 2011 20:14:29 +0000 (21:14 +0100)
committermarkus schnalke <meillo@marmaro.de>
Sun, 20 Nov 2011 20:14:29 +0000 (21:14 +0100)
sbr/utils.c

index 99c5510..55be77c 100644 (file)
@@ -78,8 +78,10 @@ pwd(void)
                return curwd;
        }
 
-       if ((cp = curwd + strlen(curwd) - 1) > curwd && *cp == '/')
+       if ((cp = curwd + strlen(curwd) - 1) > curwd && *cp == '/') {
+               /* strip trailing slash */
                *cp = '\0';
+       }
 
        return curwd;
 }