summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-12-02 16:42:46 +0800
committer魏曹先生 <1992414357@qq.com>2025-12-02 16:42:46 +0800
commit468149c9ba92709cf9dfcb8306907c36ba799702 (patch)
tree9cd1aa029ac083f136ac62802c53651728c03871
parentcbbe17e556c29e2fe69393bff9e694efe09410f3 (diff)
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.
-rw-r--r--locales/help_docs/en.yml1
-rw-r--r--locales/help_docs/zh-CN.yml1
-rw-r--r--src/bin/jv.rs19
3 files changed, 0 insertions, 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!(