alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
42.52k stars 5.5k forks source link

离线下载结束,移动文件时使用move而不是copy #6459

Closed permheaddamage closed 2 months ago

permheaddamage commented 4 months ago

Please make sure of the following things

Description of the feature / 需求描述

我把移动硬盘挂载在了/mnt/sda1,并且创建了一个alist本地存储/ssd指向这个目录。 同时我把temp_dir定在了/mnt/sda1/incomplete。 在/ssd中添加离线下载,完成后,几十G的文件,alist是花费巨量时间把文件复制过去。 其实一个移动就可以了。

Suggested solution / 实现思路

此处是否应该检查目标文件系统是否跟temp_dir在同一个分区,是的话就直接move https://github.com/alist-org/alist/blob/78a9676c7cdd282b68f27acdd2a095df427aa228/internal/offline_download/tool/transfer.go#L52C12-L52C15

Additional context / 附件

No response

welcome[bot] commented 4 months ago

Thanks for opening your first issue here! Be sure to follow the issue template!

pongfcnkl commented 4 months ago

不保种吗?

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 months ago

Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.