fix(fs):After the file is copied or moved, flush the cache of the directory that was copied or moved to.#592
Merged
PIKACHUIM merged 15 commits intoOpenListTeam:mainfrom Jul 24, 2025
Merged
Conversation
chore(quark_uc): `webdav_policy` default to native_proxy
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that after files or directories are copied, their destination directory cache is refreshed only once per batch by tracking copy tasks, and adds cache-clearing after individual copies. It also bumps the AdditionVersion in the Quark/UC driver and configures proxy settings conditionally.
- Introduce
batchCopyTrackerto group copy tasks by destination directory and clear cache post-completion. - Add
op.ClearCachecalls after successful single-file copies in_copyandCopyTask.Run. - Update
QuarkOrUC.Initto setAdditionVersion = 2and configureWebdavPolicywhen noDownProxyUrlis provided.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/fs/copy.go | Implement batch copy tracker, register/complete tasks, and clear cache after copies |
| drivers/quark_uc/driver.go | Change AdditionVersion to 2 and conditionally set WebdavPolicy |
Comments suppressed due to low confidence (2)
internal/fs/copy.go:91
- The new batch copy tracker logic isn't backed by unit tests. Adding tests for task registration, completion behavior, and stale-entry cleanup would help prevent regressions.
// 批量复制任务跟踪器 - 按目标目录聚合所有复制任务
drivers/quark_uc/driver.go:42
- [nitpick] The updated condition now also checks
DownProxyUrl, but the reasoning for this additional check isn't documented. Consider adding a comment explaining whyWebProxyandWebdavPolicyare only set when noDownProxyUrlis provided.
if !d.UseTransCodingAddress && len(d.DownProxyUrl) == 0 {
Suyunmeng
added a commit
that referenced
this pull request
Jul 30, 2025
…ectory that was copied or moved to. (#592)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix caching issues from #476 and #515 and #581