summaryrefslogtreecommitdiff
path: root/summain
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-06-12 14:43:53 +0100
committerLars Wirzenius <liw@liw.fi>2011-06-12 14:43:53 +0100
commitcb99a3a420e6abc42a9104895b1b4bd60d9faca1 (patch)
tree74d1c4d4a1ddc3c9d4174d86cb96bd90e7800b76 /summain
parent6e509ffb51671c467b2e6ee629cad8bdbe75a260 (diff)
downloadsummain-cb99a3a420e6abc42a9104895b1b4bd60d9faca1.tar.gz
Add --secret option and fix subdir name sorting.
Diffstat (limited to 'summain')
-rwxr-xr-xsummain4
1 files changed, 3 insertions, 1 deletions
diff --git a/summain b/summain
index 35cf634..7082594 100755
--- a/summain
+++ b/summain
@@ -29,6 +29,8 @@ class Summain(cliapp.Application):
'print paths relative to arguments')
self.settings.boolean(['mangle-paths', 'm'],
'mangle (obfuscate) paths')
+ self.settings.string(['secret'],
+ 'use SECRET to make mangled paths unguessable')
self.settings.string_list(['exclude'],
'do not output or compute FIELD',
metavar='FIELD')
@@ -42,7 +44,7 @@ class Summain(cliapp.Application):
if os.path.isdir(root):
for dirname, dirnames, filenames in os.walk(root):
yield dirname
- dirname.sort()
+ dirnames.sort()
for filename in sorted(filenames):
yield os.path.join(dirname, filename)
else: