From dc63a966df6f69eb12ccd2230c6a3136308f0c75 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 26 Nov 2025 14:37:24 +0800 Subject: Ensure correct current directory before jv_update and jv_throw Execute correct_current_dir at the beginning of jv_hold and jv_throw to guarantee proper context environment for these operations. --- src/bin/jv.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bin/jv.rs b/src/bin/jv.rs index 911b1ff..0dd87c6 100644 --- a/src/bin/jv.rs +++ b/src/bin/jv.rs @@ -31,7 +31,7 @@ use just_enough_vcs::{ CLIENT_FILE_TODOLIST, CLIENT_FILE_WORKSPACE, CLIENT_FOLDER_WORKSPACE_ROOT_NAME, CLIENT_PATH_WORKSPACE_ROOT, PORT, REF_SHEET_NAME, }, - current::{current_doc_dir, current_local_path}, + current::{correct_current_dir, current_doc_dir, current_local_path}, data::{ local::{ LocalWorkspace, @@ -2478,6 +2478,8 @@ async fn jv_hold(args: HoldFileArgs) { return; }; + let _ = correct_current_dir(); + jv_change_edit_right( hold_files, EditRightChangeBehaviour::Hold, @@ -2498,6 +2500,8 @@ async fn jv_throw(args: ThrowFileArgs) { return; }; + let _ = correct_current_dir(); + jv_change_edit_right( throw_files, EditRightChangeBehaviour::Throw, -- cgit