V3 跨网盘 copy 的时候 自动2次检测 : 创建补齐 相关文件夹/路径
Please make sure of the following things
- [X] I have read the documentation.
- [X] I'm sure there are no duplicate issues or discussions.
- [X] I'm sure this feature is not implemented.
- [X] I'm sure it's a reasonable and popular requirement.
Description of the feature / 需求描述
就比如 网盘数据 复制 到本地, {"src_dir":"/189/attach/ABC","dst_dir":"/local/attach/ABC","names":["技术资料.zip"]} 原本这样没有问题可以直接复制成功,
但是 【并发】的情况下,我这边浏览器还停留在 [确定]按钮的界面, 而另一台电脑(服务器) 阴差阳错 却已经删除了/local/attach/ABC的ABC这个文件夹, 结果就导致复制失败, 因为 我按下[确定]的那一刻, 本地目标目录 ABC文件夹 已经不存在了.
Suggested solution / 实现思路
所以, 当用户 按下 [确定] => post http://*****/api/fs/copy 之后
copy内部代码逻辑, 期望走几个个前提步骤:
1.优先check 当前被复制得文件 还在不在, 万一 并发 连这个文件都删了.... 尬, 如果不存在 直接返回错误(如:500状态码+msg) 退出本次copy任务!
2.re_check 检测目标dst_dir 是否存在 相关文件夹 是否此刻此秒 是否依然 存在 可访问
3..如果不存在,则自动重新补全/创建对应文件夹 => 比较麻烦的倒是 深层次 文件夹 得一路 补上... 大佬考虑下 向下递归
4.最后复制
Additional context / 附件
No response
另一个 场景 就是 我从网盘A 复制到 网盘B 的时候 想新建文件夹,目前版本UI得我手动来回切换到不同的 网盘B 去创建好 文件夹, 然后又切换回网盘A目录去 重新操作copy步骤... 有点小麻烦...
Hello, this issue has been inactive for more than 30 days and will be closed if inactive for another 30 days.
Hello @, this issue was closed due to inactive more than 60 days. You can reopen or recreate it if you think it should continue.