diff --git a/scripts/file_operations.py b/scripts/file_operations.py index f3cd3a458ba0..90c9a1e4d775 100644 --- a/scripts/file_operations.py +++ b/scripts/file_operations.py @@ -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: