]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
More clean-up, not that / means /.
authorJim Meyering <jim@meyering.net>
Sun, 24 Nov 2002 16:25:26 +0000 (16:25 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 24 Nov 2002 16:25:26 +0000 (16:25 +0000)
src/du.c

index 65ed2cff9cc21b7a9c29b32bfbbe431712cf930c..b5c52581054f995552273cef00e15df23248a897 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -505,11 +505,12 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
        }
 
       free (name_space);
-      pop_dir (cwd, path->text);
 
       str_trunc (path, prev_len); /* Remove any "/" we added.  */
+      pop_dir (cwd, path->text);
+
       if (depth <= max_depth || top)
-       print_size (size, path->length > 0 ? path->text : "/");
+       print_size (size, path->text);
       return opt_separate_dirs ? 0 : size;
     }
   else if ((opt_all && depth <= max_depth) || top)
@@ -517,7 +518,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
       /* FIXME: make this an option.  */
       int print_only_dir_size = 0;
       if (!print_only_dir_size)
-       print_size (size, path->length > 0 ? path->text : "/");
+       print_size (size, path->text);
     }
 
   return size;