aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-10-12 19:37:13 +0200
committerMattias Andrée <maandree@operamail.com>2013-10-12 19:37:13 +0200
commit0e0ff5f3a5a534d1060b10f5ca2a21d56f439a68 (patch)
treeec9bae22d1e16475f8fea6b824f3514425268e04 /src
parentm + add info manual (diff)
downloadbfind-0e0ff5f3a5a534d1060b10f5ca2a21d56f439a68.tar.gz
bfind-0e0ff5f3a5a534d1060b10f5ca2a21d56f439a68.tar.bz2
bfind-0e0ff5f3a5a534d1060b10f5ca2a21d56f439a68.tar.xz
ignore the root of the crawl for -v
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bfind.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bfind.py b/src/bfind.py
index 081a8d0..c757875 100755
--- a/src/bfind.py
+++ b/src/bfind.py
@@ -43,6 +43,7 @@ visited_name = set()
visited_id = set()
queue = None
start_dev = os.stat(path if path != '' else '.').st_dev
+start_len = len(path)
if path == '':
queue = os.listdir()
@@ -52,7 +53,7 @@ else:
while len(queue) > 0:
path = queue[0]
queue[:] = queue[1:]
- if visible and (path.startswith('.') or ((os.sep + '.') in path)):
+ if visible and ((os.sep + '.') in path[start_len:]):
continue
if hardlinks:
stat = os.stat(path)