From 4e5062b35dbb690a27f9d67d4ec37f347ab1c5d3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 18 Dec 2013 02:37:18 +0100 Subject: fix bug in -v with implicit root path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/bfind.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bfind.py b/src/bfind.py index c757875..ccedfd3 100755 --- a/src/bfind.py +++ b/src/bfind.py @@ -53,8 +53,11 @@ else: while len(queue) > 0: path = queue[0] queue[:] = queue[1:] - if visible and ((os.sep + '.') in path[start_len:]): - continue + if visible: + if (os.sep + '.') in path[start_len:]: + continue + elif (start_len == 0) and path.startswith('.'): + continue if hardlinks: stat = os.stat(path) stat = (stat.st_dev, stat.st_ino) -- cgit v1.2.3-70-g09d2