summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/du.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/du.c b/src/du.c
index 15b44616a..c82fa1a3c 100644
--- a/src/du.c
+++ b/src/du.c
@@ -474,7 +474,8 @@ process_file (const char *file, const struct stat *sb, int file_type,
fwrite (file, arg_length, 1, stdout);
/* Print everything after what we appended. */
fputs (file + arg_length + suffix_length
- + (file[arg_length + suffix_length] == '/'), stdout);
+ + (file[arg_length - 1] == '/'
+ && file[arg_length + suffix_length] == '/'), stdout);
}
else
{