diff options
author | Jim Meyering <jim@meyering.net> | 2003-09-19 07:39:04 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-09-19 07:39:04 +0000 |
commit | 969d9407d328f953ab2487da4604228afb906415 (patch) | |
tree | a4c013bc19e6849a032f781d8bf27ac18261ef74 | |
parent | ff9bb9d85e935d936493d2fdaa8761849e729001 (diff) | |
download | coreutils-969d9407d328f953ab2487da4604228afb906415.tar.xz |
`du -D symlink-to-dir' would mistakenly omit the slash in
lines like this: 24 symlink-to-dir/subdir
(process_file): Fix offset calculation.
Reported by Jeff Sheinberg as Debian bug #211591;
http://bugs.debian.org/205251
-rw-r--r-- | src/du.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 { |