8000 fix(fs): remove old target object from cache before updating by gaoyifan · Pull Request #8352 · AlistGo/alist · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(fs): remove old target object from cache before updating #8352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2025

Conversation

gaoyifan
Copy link
Contributor
@gaoyifan gaoyifan commented Apr 12, 2025

当执行 Rename 并启用 Overwrite existing files 选项时,由于重命名的目标没有从缓存中删除,导致目录缓存中存在两个同名文件,因此列目录时(可能)看到的依然是旧文件。

本 PR 在更新缓存前从缓存中删除了旧的目标文件,以确保缓存正确性。

BTW,对于未勾选 Overwrite existing files 选项的情形,由于目标文件不存在,因而不会触发删除操作。

@gaoyifan gaoyifan mentioned this pull request Apr 12, 2025
4 tasks
@xhofe xhofe merged commit c8470b9 into AlistGo:main Apr 12, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0