diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-26 14:37:24 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-26 14:37:24 +0800 |
| commit | dc63a966df6f69eb12ccd2230c6a3136308f0c75 (patch) | |
| tree | ec394637266e92bb81221ec1097ff21d236748c6 /src/bin | |
| parent | db29a8b3aafd32f813197db4bd855dd896d36fa2 (diff) | |
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.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/jv.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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, |
