Repository navigation
Conversation
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.
op.ArchiveDecompressreads the destination directory withGetUnwrapbefore making sure it exists. For drivers that decompress server-side (115 Open, Cloudreve v4, Doubao, Alias, AList v3, ...), extracting an archive within the same storage into a nested path that doesn't exist yet fails withobject not found. When the destination is on another storage, or the driver doesn't decompress server-side,fs.archiveDecompressfalls back to the download-and-upload task, which goes throughMakeDir/Putand creates the directory, so the same request behaves differently depending on the driver.This is the gap #9662 and #9668 fixed for
CopyandMove. This adds the sameMakeDircall after the source object is resolved.MakeDiris recursive and a no-op for an existing directory, so nothing changes for existing paths.Test:
internal/op/archive_test.goregisters a test driver that embedsLocaland implementsdriver.ArchiveDecompress(it writes a fixed file into the destination), then decompresses into/a/b, which doesn't exist yet. It fails onmainwithobject not foundand passes with this change. It follows the same Local storage setup as the Copy and Move tests infs_test.go.Ran
go test ./internal/op/(whole package ok) on go1.27 linux/amd64.