Skip to content

Commit

Permalink
Ignore hidden files
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagano committed Oct 29, 2022
1 parent 9a9d25f commit c2ff7b2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions portpeek
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ def get_recursive_info(filename):
# get listing of directory
filenames = os.listdir(filename)
for file_name in filenames:
get_recursive_info(filename + os.path.sep + file_name)
if not file_name.startswith('.'):
get_recursive_info(filename + os.path.sep + file_name)
else:
get_info(filename)

Expand Down Expand Up @@ -1330,7 +1331,8 @@ def clean_useflagsFile(filename):
# get listing of directory
filenames = os.listdir(filename)
for file_name in filenames:
clean_useflagsFile(filename + os.path.sep + file_name)
if not file_name.startswith('.'):
clean_useflagsFile(filename + os.path.sep + file_name)
return
else:
# go through stable array and remove line if found
Expand Down Expand Up @@ -1469,7 +1471,8 @@ def cleanFile(filename):
# get listing of directory
filenames = os.listdir(filename)
for file_name in filenames:
cleanFile(filename + os.path.sep + file_name)
if not file_name.startswith('.'):
cleanFile(filename + os.path.sep + file_name)
return
else:
# go through stable array and remove line if found
Expand Down

0 comments on commit c2ff7b2

Please sign in to comment.