Better ls output fixing.
authorPhil Pennock <pdp@exim.org>
Mon, 23 Apr 2012 03:20:16 +0000 (20:20 -0700)
committerPhil Pennock <pdp@exim.org>
Mon, 23 Apr 2012 03:20:16 +0000 (20:20 -0700)
fixes bug 1226
Further investigation from Jeremy Harris showed the previous fix
left trailing whitespace on output which previously ended after
the permission bits (eg, test 0240).

This works better for me.

test/runtest

index c199539a54e41ccd785fff9efa0da5113dc21840..69c6931b082c013f96e4b705c9710784d95e7219 100755 (executable)
@@ -598,7 +598,9 @@ RESET_AFTER_EXTRA_LINE_READ:
   # Handle only the Gnu and MacOS space, dot, plus and at-sign.  A full [[:graph:]]
   # unfortunately matches a non-ls linefull of dashes.
   # Allow the case where we've already picked out the file protection bits.
   # Handle only the Gnu and MacOS space, dot, plus and at-sign.  A full [[:graph:]]
   # unfortunately matches a non-ls linefull of dashes.
   # Allow the case where we've already picked out the file protection bits.
-  s/^([-d](?:[-r][-w][-SsTtx]){3})[.+@]?( +|$)/\1 /;
+  if (s/^([-d](?:[-r][-w][-SsTtx]){3})[.+@]?( +|$)/\1\2/) {
+    s/ +/ /g;
+  }
 
 
   # ======== Message sizes =========
 
 
   # ======== Message sizes =========