-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Overwriting a file through webdav and killing the process the original file disappear #9302
Comments
I think there is code in the chunking routines that detect such cancelled calls, but I don't remember exactly what they do. They should actually only delete the chunks but not the original file. |
It looks like I've got a similar issue in #9452: one upload failed because for some unknown reason the file size didn't match. And after that the file was actually moved to the trashbin and the sync client would get 412 precondition failed! Needs further investigation. |
@javiergonzper you should actually use Will try to reproduce this. |
Well, I suppose it's probably deleting the wrong file here: https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/aborteduploaddetectionplugin.php#L80 |
It looks like this code is executed too later, after the part file has been renamed already ! |
Setting to OC 7 CE (with backport to 6.0.5) as loss of data is involved @karlitschek |
From what I see this code is only triggered when chunking is NOT involved. |
as discussed: I'll have a look at this asap - most probably tomorrow |
As discussed with @DeepDiver1975, he'll have a look. The issue is that the "AbortedUploadDetectionPlugin" runs too late. It should actually check the size earlier, check it on the part file. And delete the part file if the size does not match. Assigning to @DeepDiver1975 |
On the iOS app, we are not using chunks any more because of the background feature |
Steps to reproduce
1- Upload a file using curl with the same name than other existing:
curl -X PUT -u username:password "https://XXXXXXXXX/owncloud/remote.php/webdav/Dia-0.97.2-7.dmg" -F myfile=@"/Users/Javi/Downloads/Dia-0.97.2-7.dmg"
2- Kill the process (ctrl+c)
Expected behaviour
The upload is canceled so the file is not upload and the existing file should still there.
Actual behaviour
The upload is canceled but the existing file disappear
Owncloud version:
{"installed":"true","version":"6.0.3.1","versionstring":"6.0.3","edition":"enterprise"}
Logs
I don’t see any logs related to this
The text was updated successfully, but these errors were encountered: