Skip to content

Commit

Permalink
Fixes "/" search not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Torantulino committed Apr 6, 2023
1 parent 7080881 commit b8f2dd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/file_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def delete_file(filename):

def search_files(directory):
found_files = []
search_directory = safe_join(working_directory, directory)

if directory == "" or directory == "/":
search_directory = working_directory
else:
search_directory = safe_join(working_directory, directory)

for root, _, files in os.walk(search_directory):
for file in files:
Expand Down

0 comments on commit b8f2dd5

Please sign in to comment.