mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
ceed90aea8
- 在 Lua 配置中新增 backup.dir 配置项,允许设置默认备份路径 - 修改 backup_registry() 函数,接受自定义备份路径参数,优先级为:传入参数 > Lua 配置 > 默认 %APPDATA% 路径 - 在保存操作前,通过对话框让用户选择“使用默认路径”、“自定义目录”或“跳过备份” - 更新 README 文档,说明新的备份功能和多语言支持等架构细节
17 lines
385 B
C
17 lines
385 B
C
#ifndef OS_ENV_H
|
|
#define OS_ENV_H
|
|
|
|
#include "utils/error_code.h"
|
|
|
|
// 检查是否以管理员权限运行
|
|
int check_admin(void);
|
|
|
|
// 检查路径是否有效
|
|
int is_path_valid(const char *path);
|
|
|
|
// 备份注册表
|
|
// 参数 backup_path: 自定义备份目录路径,传 NULL 使用 Lua 配置中的默认路径
|
|
ErrorCode backup_registry(const char *backup_path);
|
|
|
|
#endif // OS_ENV_H
|