Spaces:
Sleeping
Sleeping
Fix the history directory creation for new users (#967)
Browse filesRelated issues: https://github.com/GaiZhenbiao/ChuanhuChatGPT/issues/965
- modules/utils.py +1 -0
modules/utils.py
CHANGED
@@ -430,6 +430,7 @@ def sorted_by_last_modified_time(list, dir):
|
|
430 |
|
431 |
|
432 |
def get_file_names_by_type(dir, filetypes=[".json"]):
|
|
|
433 |
logging.debug(f"获取文件名列表,目录为{dir},文件类型为{filetypes}")
|
434 |
files = []
|
435 |
for type in filetypes:
|
|
|
430 |
|
431 |
|
432 |
def get_file_names_by_type(dir, filetypes=[".json"]):
|
433 |
+
os.makedirs(dir, exist_ok=True)
|
434 |
logging.debug(f"获取文件名列表,目录为{dir},文件类型为{filetypes}")
|
435 |
files = []
|
436 |
for type in filetypes:
|