]> arthur.barton.de Git - bup.git/commitdiff
ls: include hidden files when explicitly requested
authorGabriel Filion <lelutin@gmail.com>
Mon, 16 May 2011 04:27:22 +0000 (00:27 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 29 May 2011 22:59:14 +0000 (18:59 -0400)
The current code of 'bup ls' insists on hiding a file from its listing
even if the file was explicitly requested as an argument. This is not
what users would expect. Remove the condition and always list files
(not directories) starting with a dot when they were given in the
argument list.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
cmd/ls-cmd.py

index 2fa61262df0d839d2859bbdf0268bbe77f2b73d7..f2252b34023637215411cedd3f557a44d4949f7f 100755 (executable)
@@ -43,11 +43,10 @@ for d in extra:
                     else:
                         print node_name(sub.name, sub)
         else:
-            if opt.all or not n.name.startswith('.'):
-                if istty1:
-                    L.append(node_name(d, n))
-                else:
-                    print node_name(d, n)
+            if istty1:
+                L.append(node_name(d, n))
+            else:
+                print node_name(d, n)
     except vfs.NodeError, e:
         log('error: %s\n' % e)
         ret = 1