-
Notifications
You must be signed in to change notification settings - Fork 112
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
fix: chunked upload of existing file creates new version #1899
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
This pull request introduces 13 alerts when merging 0cc96aa into 7df477f - view on LGTM.com new alerts:
|
0cc96aa
to
2fbbc74
Compare
2fbbc74
to
36f3efa
Compare
This pull request introduces 13 alerts when merging 36f3efa into 7df477f - view on LGTM.com new alerts:
|
@@ -360,6 +358,33 @@ func (fs *Decomposedfs) GetUpload(ctx context.Context, id string) (tusd.Upload, | |||
}, nil | |||
} | |||
|
|||
// lookupNode looks up nodes by path. | |||
// This method can also handle lookups for paths which contain chunking information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a reason how this function differs from the one in the lookup interface? Do you think other implementations of the decomposedfs need the same handling / detection of chunked paths? should fs.lu.NodeFromPath
maybe get a parameter to handle chunked paths? why not add a fs.lu.NodeFromChunkedPath
and refactor the two functions to share more code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now I see that you are calling fs.lu.NodeFromPath
in lookupNode
... nevermind my comment ;-)
Chunked uploads didn't create a new version, when the file to upload already existed.