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
41.92k stars 5.41k forks source link

Windows的版本重启之后,会把/data/temp文件夹删掉 #7067

Open JoeNik opened 3 weeks ago

JoeNik commented 3 weeks ago

Please make sure of the following things

AList Version / AList 版本

V3.36.0

Driver used / 使用的存储驱动

aliyunopen

Describe the bug / 问题描述

程序重启之后会把data目录下的temp给删除,并且不会自动创建,这样复制文件的时候就出现错误,错误日志贴在下面了,同时这个问题在v3.35.0是不存在的

Reproduction / 复现链接

Config / 配置

Logs / 日志

getting src object

open F:\alist\data\temp\file-409226004: The system cannot find the path specified.
welcome[bot] commented 3 weeks ago

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

Deepsea-CN commented 3 weeks ago

这不是bug,所有版本都是这样,是专门设计的特性,详见文档,为了避免出现问题,alist默认在重启时自动清空temp和beleve文件夹,请勿在此存放持久化数据

JoeNik commented 2 weeks ago

但现在重启后,如果没有手动创建tmp目录,直接去复制文件,就会报这个错误, 早期的版本没有这个问题,我测试了v3.35.0是可以自动创建,最近更新的两个版本都不能自动创建

getting src object

open F:\alist\data\temp\file-409226004: The system cannot find the path specified.
Deepsea-CN commented 2 weeks ago

但现在重启后,如果没有手动创建tmp目录,直接去复制文件,就会报这个错误,早期的版本没有这个问题呀

getting src object

open F:\alist\data\temp\file-409226004: The system cannot find the path specified.

这个确实是个问题,前面我理解的不对,我在复制文件是也遇到过这个问题,使用的是Linux版本,症状就是不能正确生成中转文件导致不能复制,正常情况重启应该只会清掉temp下的内容,但是现在整个/data/temp文件夹都丢失了,你应该把这段报错放到问题描述里,让开发者能看到

JoeNik commented 2 weeks ago

嗯 ,我贴到描述里面了

AsenHu commented 1 week ago

同样的问题发生在 https://github.com/alist-org/alist/commit/d4e3355f5692a690a8aa02298b0052e4340a3e55 linux-musl-amd64

HADB commented 1 week ago

跟 window 版应该没关系,我用的 docker,同样遇到这个问题

HADB commented 1 week ago

对比了下 v3.35.0 和 v3.36.0 的 diff,感觉问题可能出在这个 commit,新增了一个 CleanTempDir 方法,会删除整个 temp 文件夹,可能某种场景下是在创建后删除了,并且在使用的时候没有重新创建。