From 468149c9ba92709cf9dfcb8306907c36ba799702 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 2 Dec 2025 16:42:46 +0800 Subject: Remove local file existence check from change edit right The check for whether files exist locally before allowing edit right changes has been removed. This allows users to change edit rights for files that may not yet exist locally but are tracked in the sheet. --- locales/help_docs/en.yml | 1 - locales/help_docs/zh-CN.yml | 1 - src/bin/jv.rs | 19 ------------------- 3 files changed, 21 deletions(-) diff --git a/locales/help_docs/en.yml b/locales/help_docs/en.yml index 08bd95d..1c65029 100644 --- a/locales/help_docs/en.yml +++ b/locales/help_docs/en.yml @@ -570,7 +570,6 @@ jv: %{path} (%{reason}) check_fail_reason: - not_found_in_local: File Not Found not_found_in_sheet: Mapping Not Found In Sheet not_a_tracked_file: File Not Tracked base_version_unmatch: Version Mismatch diff --git a/locales/help_docs/zh-CN.yml b/locales/help_docs/zh-CN.yml index 82ae6af..a0fd161 100644 --- a/locales/help_docs/zh-CN.yml +++ b/locales/help_docs/zh-CN.yml @@ -572,7 +572,6 @@ jv: %{path}(%{reason}) check_fail_reason: - not_found_in_local: 文件未找到 not_found_in_sheet: 表中不存在 not_a_tracked_file: 文件未被跟踪 base_version_unmatch: 基准版本不匹配 diff --git a/src/bin/jv.rs b/src/bin/jv.rs index 62ec487..1219711 100644 --- a/src/bin/jv.rs +++ b/src/bin/jv.rs @@ -2727,25 +2727,6 @@ async fn jv_change_edit_right( } for file in filtered_files { - let full_path = local_dir.join(&file); - - // File exists - if !full_path.exists() { - let reason = t!( - "jv.fail.change_edit_right.check_fail_item", - path = file.display(), - reason = t!("jv.fail.change_edit_right.check_fail_reason.not_found_in_local") - ) - .trim() - .to_string(); - - if !handle_validation_failure(show_fail_details, &mut details, &mut failed, num, reason) - { - return; - } - continue; - } - // Mapping exists if !cached_sheet.mapping().contains_key(&file) { let reason = t!( -- cgit