From: Gabriel Filion Date: Mon, 16 May 2011 04:27:22 +0000 (-0400) Subject: ls: include hidden files when explicitly requested X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=437c63000eccce1682c88507c611d56b61a2f1fb;p=packages%2Fb%2Fbup.git ls: include hidden files when explicitly requested 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 --- diff --git a/cmd/ls-cmd.py b/cmd/ls-cmd.py index 2fa6126..f2252b3 100755 --- a/cmd/ls-cmd.py +++ b/cmd/ls-cmd.py @@ -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