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

Moving or copying the folder with a replace option does not work #10515

Closed
ScharfViktor opened this issue Feb 26, 2024 · 5 comments
Closed

Moving or copying the folder with a replace option does not work #10515

ScharfViktor opened this issue Feb 26, 2024 · 5 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Feb 26, 2024

ocis: 5.1.0-prealpha+44bdea9608
web: 8.0.0-rc.5

Steps:

  • create folder1/file1.txt and subfolder/folder1/file2.txt
  • copy or move folder1 to subfolder/folder1 with replays option

Expect: subfolder/folder1 contains two files: file1.txt and file2.txt
Actual:
image

Screen.Recording.2024-02-26.at.15.44.54.mov

Same case uploading folder with replace works fine

@ScharfViktor ScharfViktor added the Type:Bug Something isn't working label Feb 26, 2024
@ScharfViktor ScharfViktor moved this from Qualification to Prio 2 in Infinite Scale Team Board Feb 26, 2024
@ScharfViktor ScharfViktor added the Priority:p2-high Escalation, on top of current planning, release blocker label Feb 27, 2024
@JammingBen JammingBen self-assigned this Mar 13, 2024
@JammingBen JammingBen moved this from Prio 2 to In progress in Infinite Scale Team Board Mar 13, 2024
@kulmann
Copy link
Member

kulmann commented Mar 14, 2024

I don't agree with the expected behaviour. The content after replacing should be file1.txt. I'd only expect to have both text files if there was a Merge option, but there is none.

@ScharfViktor
Copy link
Contributor Author

I don't agree with the expected behaviour. The content after replacing should be file1.txt. I'd only expect to have both text files if there was a Merge option, but there is none.

then we have uploading folder issue. should be same behavior IMHO

steps:

  • create f1/test.txt
  • upload f1 which contains file new.txt with replace option

Result: f1 contains new.txt and test.txt

@JammingBen
Copy link
Contributor

Not sure if we can do much about that the moment since uploading and copying/moving are being handled differently.

Uploading a folder goes through each file separately to upload it. That means existing files in a folder are not affected. Whereas copying/moving are WebDAV operations and handle the folder itself as one resource. In case of replacing, the client sends an overwrite header to the server so it will replace the folder with all its contents completely.

Solutions I can think of:

  • Improve on our wording: "Replace" becomes "Merge" in case of an upload.
  • Delete the existing folder first before uploading a new folder with the "Replace" option.

I prefer the first approach to be honest.

@kulmann
Copy link
Member

kulmann commented Mar 20, 2024

Solutions I can think of:

  • Improve on our wording: "Replace" becomes "Merge" in case of an upload.
  • Delete the existing folder first before uploading a new folder with the "Replace" option.

I prefer the first approach to be honest.

Yes, I think the same. The "Replace" option in folder upload conflict handling should be named "Merge" instead. Doing a delete before uploading would open a can of worms for error handling (I'd expect a rollback for the deleted folder in case the upload goes wrong...)

@JammingBen
Copy link
Contributor

I created #10640 to keep track of it. Which means I'm closing here as this has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants