refactor: normalize filetree upload target plans

This commit is contained in:
lix-2026
2026-05-25 09:10:41 +08:00
parent 8b27bd45aa
commit c3b1aea30e
3 changed files with 37 additions and 1 deletions
@@ -3188,6 +3188,10 @@ const SIDEBAR_TREE_JS: &str = r##"
}
try {
var plan = await preflightFileTreeUploadTarget(detail || {});
var normalizePlanRuntime = fileTreeRuntimeFunction('normalizeFileTreeUploadTargetPlan');
if (normalizePlanRuntime) {
return normalizePlanRuntime(detail || {}, plan);
}
if (detail && Object.prototype.hasOwnProperty.call(detail, 'targetRelativePath')) {
plan.targetRelativePath = String(detail.targetRelativePath || '');
}