Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Fixes "/" search not working.

Toran Bruce Richardsb8f2dd59c8f5
diff --git a/scripts/file_operations.py b/scripts/file_operations.py
index f3cd3a458b..90c9a1e4d7 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: