Skip to content

Commit

Permalink
2.0.3 修复更新带来的小bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Jan 16, 2025
1 parent 0271e78 commit 3b7de3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filecat",
"version": "2.0.2",
"version": "2.0.3",
"description": "filecat 文件管理器",
"author": "xiaobaidadada",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/main/domain/shell/PtyShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export class PtyShell {
break;
default:
// 未知的不报错也不执行
return;
return;
}
}
if (this.cmd_set.has(exe)) {
Expand Down Expand Up @@ -810,12 +810,14 @@ export class PtyShell {
this.child = this.node_require.child_process.spawn(exe, params, {
shell:true,
cwd: this.cwd, // 设置子进程的工作目录
env: {...process.env, ...this.env}, // 传递环境变量
env: {...process.env, ...this.env,LANG: 'en_US.UTF-8'}, // 传递环境变量
// stdio: 'inherit' // 让子进程的输入输出与父进程共享 pipe ignore inherit
// timeout: 5000, // 设置超时为 5 秒
maxBuffer: 1024 * 1024 * 10,// 设置缓冲区为 10 MB
...spawn_option
});
// 设置编码为 'utf8',确保输出按 UTF-8 编码解析
this.child.stdout.setEncoding('utf8');
this.child.stdout.on('data', (data) => {
const v = data.toString(); // 子程序没有换行等符号不会立即输出 有缓冲区
this.send_and_enter(v);
Expand Down
1 change: 1 addition & 0 deletions src/main/domain/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export class UserService {
// 角色作用
this.update_user_role_data(data);
DataUtil.set(data_common_key.user_id_info_data_mapping, mapping);
this.load_user_cmd_path(id); // 权限更新
}

// 删除用户 id
Expand Down

0 comments on commit 3b7de3d

Please sign in to comment.