Skip to content
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

mv operation doesn't delete old file with digital ocean spaces #929

Closed
fviard opened this issue Nov 5, 2017 · 1 comment
Closed

mv operation doesn't delete old file with digital ocean spaces #929

fviard opened this issue Nov 5, 2017 · 1 comment
Assignees

Comments

@fviard
Copy link
Contributor

fviard commented Nov 5, 2017

With DO spaces service, original file is not deleted of a successful move.
(And this is silent, no error reported)

@fviard fviard self-assigned this Nov 5, 2017
@fviard
Copy link
Contributor Author

fviard commented Nov 5, 2017

Issue is coming from an xml parsing issue.
The xml response data given by DO for a COPY request is incorrect:
'<CopyObjectResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><LastModified>2017-11-05T00:36:02.161Z</LastModified><ETag>054fca7c5228bd350d60c06d8c319e4f-2</ETag></CopyObjectResult>',

The xml declaration is missing at the beginning. The reply should be like:
'<?xml version="1.0" encoding="UTF-8"?>\n<CopyObjectResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><LastModified>2017-11-05T00:27:49.000Z</LastModified><ETag>&quot;ba49a173c832e157a38ba966e0d7bcdb&quot;</ETag></CopyObjectResult>'

(To be noted, aws put a \n after the xml declaration, and DO don't do that for its other requests).

xml namespace stripping code in s3cmd has to be fixed to handle such a case.

@fviard fviard closed this as completed in 6d8e621 Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant