dont_scan = lambda k: not skip_entry.has_key(k)
flist = filter(dont_scan, flist)
flist.sort()
- return map(node.Entry, flist)
+ # Add ./ to the beginning of the file name so that if it begins with a
+ # '#' we don't look it up relative to the top-level directory.
+ return map(lambda f, node=node: node.Entry('./'+f), flist)
""")
test.write([ 'bsig', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'bsig', '#hash.txt' ], 'hash.txt 1\n')
test.write([ 'bsig', 'subdir', 'bar.txt'], 'bar.txt 1\n')
+test.write([ 'bsig', 'subdir', '#hash.txt'], 'hash.txt 1\n')
test.write([ 'csig', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'csig', '#hash.txt' ], 'hash.txt 1\n')
test.write([ 'csig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'csig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
test.write([ 'cmd-bsig', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'cmd-bsig', '#hash.txt' ], 'hash.txt 1\n')
test.write([ 'cmd-bsig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'cmd-bsig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
test.write([ 'cmd-csig', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'cmd-csig', '#hash.txt' ], '#hash.txt 1\n')
test.write([ 'cmd-csig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'cmd-csig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
test.write('junk.txt', 'junk.txt\n')
test.run(arguments=".", stderr=None)