summaryrefslogtreecommitdiff
path: root/cmds-fi-du.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-05-08 14:17:29 -0700
committerDimitri John Ledkov <xnox@ubuntu.com>2018-05-08 14:17:29 -0700
commitd00c9550da1801a0eaff5cedf4312e24691b31ea (patch)
tree3881ca1764ef792259e1b70f12c884a3ac0c0715 /cmds-fi-du.c
parentdab6d2181f1f194ec3a76d900cf2c6533379cbea (diff)
New upstream release.
Diffstat (limited to 'cmds-fi-du.c')
-rw-r--r--cmds-fi-du.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-fi-du.c b/cmds-fi-du.c
index 8a44665c..7e6bb7f6 100644
--- a/cmds-fi-du.c
+++ b/cmds-fi-du.c
@@ -449,7 +449,7 @@ static int du_add_file(const char *filename, int dirfd,
}
pathtmp = pathp;
- if (pathp == path)
+ if (pathp == path || *(pathp - 1) == '/')
ret = sprintf(pathp, "%s", filename);
else
ret = sprintf(pathp, "/%s", filename);