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

Rename folder "Shared" leads to unexpected data move #5349

Closed
felixboehm opened this issue Oct 15, 2013 · 13 comments
Closed

Rename folder "Shared" leads to unexpected data move #5349

felixboehm opened this issue Oct 15, 2013 · 13 comments

Comments

@felixboehm
Copy link
Contributor

I can change the name of Shared to Shared-2 on my local filesystem, synced by the sync client.
That leads to a "move" request to the server.
Next, the sync client starts detects some changes and all files on the server in Shared get deleted, as they are no longer in Shared.

If this renaming happens without purpose, and one renames Shared-2 back to Shared again, the server throws an error for renaming it back, as you may not create a folder called Shared. You lose, data is lost.

@ghost ghost assigned DeepDiver1975 Oct 15, 2013
@dragotin
Copy link
Contributor

@felixboehm brought a good idea up: Why shouldn't we allow people to rename the Shared-Folder locally? That results in a MOVE request to the server. The server should record the move and store the new folder name. On the next propfind, there should be an additional entry in the result record of the propfind delivering the new folder name.

That way the client could maintain the new folder name.

Why not keep the mapping on the client? We keep telling that the client db can be removed and will be rebuilt if it is not there. If we loose the described name mapping info tough it would not be possible to reconstruct it.

Very good idea. That would give us the possibility to have name the Shared folder on client like the user wants.

@MTRichards, @karlitschek what do you think?

@karlitschek
Copy link
Contributor

good point. But I wouldn't change lot of the logic here because the Shared folder will be gone in ownCloud 7 anyways.

@dragotin
Copy link
Contributor

Thanks. But how will it be? Where is that discussed?

@DeepDiver1975
Copy link
Member

for oc6 I'll add a check which prevents rename/move of shared.
backport required

@karlitschek
Copy link
Contributor

@dragotin We talked about that in Berlin. Forgot? :-)

@DeepDiver1975
Copy link
Member

@dragotin #4437

@dragotin
Copy link
Contributor

@karlitschek wasn't involved, but no problem.

Ok, we will add code in the client that if the client detects that Shared was renamed to foo, foo will silently be renamed back to Shared. For now.

@MorrisJobke
Copy link
Contributor

@dragotin @karlitschek To keep it transparent we opened an issue right after the discussion on the evening in the hotel lounge ;) #4437

@karlitschek We should communicate decisions always transparent - it's a community. Just kick ass people to document decisions ;)

@karlitschek
Copy link
Contributor

@kabum Absolutely. My assumption was that it was transparent enough with the public github issue and the discussion at the developer meeting. I think the plan is also mentioned briefly in several github issues already. But we can always improve of course. Sorry. If this wasn't clear :-)

@DeepDiver1975
Copy link
Member

I suggest once we have oc6 out, to start with planning of oc7 which should include the solutions/decissions.
Right after that we need to blog about it.

@MTRichards
Copy link
Contributor

"Ok, we will add code in the client that if the client detects that Shared was renamed to foo, foo will silently be renamed back to Shared. For now."

Works for me, this would make sense and solve the issue. In the long run, this folder will disappear anyway as we remove Shared.

@dragotin
Copy link
Contributor

Commit to prevent the client from moving the Shared dir: owncloud/client@660469c Will come with 1.5.0

@DeepDiver1975
Copy link
Member

On server side with oc6 a rename operation of Shared is not allowed - I consider this as closed then

@lock lock bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants