Update: Refactor to absolute imports, fix QPS limits, and enhance Gitea sync with SQLite support

This commit is contained in:
2026-07-21 10:25:29 +08:00
parent ef04fc5627
commit 97d9d98b4c
67 changed files with 1691 additions and 457 deletions
+11 -1
View File
@@ -16,7 +16,17 @@ def select_file(log_widget, file_types=None, title="选择文件"):
"""通用文件选择对话框"""
if file_types is None:
file_types = [("所有文件", "*.*")]
file_path = filedialog.askopenfilename(title=title, filetypes=file_types)
# 获取默认输入目录
try:
config = ConfigManager()
initial_dir = config.get_path('Paths', 'input_folder', fallback='data/input')
if not os.path.exists(initial_dir):
initial_dir = os.getcwd()
except Exception:
initial_dir = os.getcwd()
file_path = filedialog.askopenfilename(title=title, filetypes=file_types, initialdir=initial_dir)
if file_path:
add_to_log(log_widget, f"已选择文件: {file_path}\n", "info")
return file_path