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

COPY file/folder to same name is possible (but 500 code error for folder with spaces path) #8711

Open
S-Panta opened this issue Mar 21, 2024 · 1 comment
Labels

Comments

@S-Panta
Copy link
Contributor

S-Panta commented Mar 21, 2024

Step to Reproduce

  1. Create this folder tree:
    • parent/child/lorem.txt
  2. COPY parent/child/lorem.txt to parent/child/lorem.txt
curl -XCOPY "https://localhost:9200/remote.php/spaces/<space-id>/parent/child/lorem.txt" \
-H"Destination: https://localhost:9200/remote.php/spaces/<space-id>/parent/child/lorem.txt" \
-uadmin:admin -vk
  1. COPY parent/child to parent/child
curl -XCOPY "https://localhost:9200/remote.php/spaces/<space-id>/parent/child" \
-H"Destination: https://localhost:9200/remote.php/spaces/<space-id>/parent/child" \
-uadmin:admin -vk

FIndings

  1. COPY to same file:
/webdav - 204 (file content exists)
/dav/files - 204 (file content exists)
/dav/spaces - 204 (file content exists)
  1. COPY to same folder:
/webdav - 204 (folder exists but folder content is moved to trashbin - ❓)
/dav/files - 204 (folder exists but folder content is moved to trashbin - ❓)
/dav/spaces - 500 (not possible in dav/spaces path)

NOTE: With Overwrite: F header, all requests return 412 Precondition Failed

Queries

  1. What is the actual behavior? Is it possible COPY to same path ?
  2. Should copying folder into same path result in creating new folder while sending that folder to trashbin?
@saw-jan saw-jan changed the title Copying file from public link to personal root has different behavior COPY file/folder to same name Mar 21, 2024
@saw-jan saw-jan changed the title COPY file/folder to same name COPY file/folder to same name is possible (but 500 code error for folder with spaces path) Mar 21, 2024
@saw-jan saw-jan added Type:Bug Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced labels Mar 21, 2024
@saw-jan saw-jan removed the Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced label Aug 5, 2024
@saw-jan
Copy link
Member

saw-jan commented Aug 5, 2024

similar issue for MOVE: #1976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants