From 400b58817ccc222ada77f6328059834f297d666e Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Sat, 12 Jul 2014 11:40:22 -0400 Subject: [PATCH] Allow "flawfinder ." (fix bug#3) - Skipping dotdir also skipped ".", but it shouldn't. - My thanks to Gerd, who provided the patch --- flawfinder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flawfinder b/flawfinder index 0a40514..e8a03e7 100755 --- a/flawfinder +++ b/flawfinder @@ -1468,7 +1468,7 @@ def maybe_process_file(f, patch_infos): num_links_skipped = num_links_skipped + 1 return base_filename = os.path.basename(f) - if (skipdotdir and len(base_filename) > 0 and ("." == base_filename[0])): + if (skipdotdir and len(base_filename) > 1 and ("." == base_filename[0])): if not quiet: print "Warning: skipping directory with initial dot", h(f) num_dotdirs_skipped = num_dotdirs_skipped + 1 return