Move / rename local sync folder (e.g. `~/Nextcloud` -> `~/MyCloud`)
Initially I was sure there already has to be an issue for this, but I didn't find one, so here it comes.
Expected behaviour
Being able to change NC base folder for account by UI
Actual behaviour
You can't. Worse: If you rename it via finder/explorer/whatever, client explodes telling you it's unable to finde the NC folder for corresponding account, but doesn't offer relocate options or similar.
Steps to reproduce
- Develop the desire to rename base folder
- Lie down, try not to cry - cry a lot.
Workarounds
- Edit config file manually (potentially dangerous, uncomfortable)
- Delete / re-add account, triggering wizard (meh)
Why should this be necessary
I admit this is rather rarely needed. But it is: Default name for NC client folder is "Nextcloud". The first time you may add a second account, you'll probably give it a meaningful name. This may result in something like "/home/User/Nextcloud" and "/home/User/NC-Work". Just reasonable to be triggered then, wanting to rename "Nextcloud" to "NC-Private".
Hey @jancborchardt 👋 This should be really simple apart from design/ux decisions. Before I put this on my agenda: Has this ever been discussed, maybe even laid down?
I don’t really remember this having been discussed, no.
Ideal of course would be as you describe that you can simply do right-click → rename of the folder and it just works. You say that currently it explodes, but is there a way that the client could know about that and automatically adjust to the new name?
Otherwise there could be a "Rename folder" action in the folder connection action menu (where "Open folder", "Edit ignored files", etc are), that seems to be the most relevant place?
Ideal of course would be as you describe that you can simply do right-click → rename of the folder and it just works. You say that currently it explodes, but is there a way that the client could know about that and automatically adjust to the new name?
I personally am not aware of any possible cross-platform solution like „folder tracking“ to let the client notice such a change with a legitimate amount of work..
Otherwise there could be a "Rename folder" action in the folder connection action menu (where "Open folder", "Edit ignored files", etc are), that seems to be the most relevant place?
Yeah, I agree, this would be the right place for this (and actually were I looked for it by intuition after having the folder renamed myself finding the client with it‘s error state).
Simplest way would be to add an entry there „change folder path“ or smth., opening a dir selection dialog (Qt) and passing this to config on close/success. Finally there should be some minor validity checks and signals to resync.
Ideal of course would be as you describe that you can simply do right-click → rename of the folder and it just works. You say that currently it explodes, but is there a way that the client could know about that and automatically adjust to the new name?
I personally am not aware of any possible cross-platform solution like „folder tracking“ to let the client notice such a change with a legitimate amount of work..
Isn't it what we do already to notice that a sync is necessary? I guess it means monitoring "one level up" since currently we monitor within the folder but not the folder itself.
@er-vin Good point, but I‘d be a little scared of the implications this would have on the read rights. AFAIK this would need complete read/list rights in the superfolder based on the current „monitoring“ technique, but could be just wrong memory of mine. This would be somehow uncool, even though it might be the case on most OS defaults anyway right now. That‘s worth being investigated I guess
Question is also how important this is with the virtual drive coming... Not saying it'd not be nice to have it as a 'feature', even if it is only possible from the client configuration screen. You could also look for the folder after you lost it and switch automatically, then you don't need to monitor more of the filesystem (which is an issue on Linux). But I bet that's a lot of work and corner cases to deal with, and can cause issues if ppl have an older / other sync folder still on the system and you pick the wrong one.
Question is also how important this is with the virtual drive coming... Not saying it'd not be nice to have it as a 'feature', even if it is only possible from the client configuration screen. You could also look for the folder after you lost it and switch automatically, then you don't need to monitor more of the filesystem (which is an issue on Linux). But I bet that's a lot of work and corner cases to deal with, and can cause issues if ppl have an older / other sync folder still on the system and you pick the wrong one.
My current understanding of the drive (disclaimer: I'm a noob) makes me think this would be largely orthogonal anyway.
Since the virtual drive is now enabled by sync folder (this change is on master), this feature request still makes sense to me.
Hillöö, I would like to manifest my interest in this feature request. (even though I couldn't say I would be the one to resolve it, unfortunately)
Hi. I've added "Rename local folder" action to the folder connection action menu - here's pull request draft. Does it meet the expectations? Waiting for your feedback
@jancborchardt Can't we do it the other way around?
- Add a checkbox in the folder setup dialog "Let Nextcloud choose the local sync folder for you" (initially unchecked)
- Once checked it is remembered in config and is then checked for every next folder being added This would give a user some usability and freedom to choose the right name from the start.
@allexzander this sounds a bit complicated though, no? It seems the solution by @tokun-mobica fixes the issue nicely?
@allexzander this sounds a bit complicated though, no? It seems the solution by @tokun-mobica fixes the issue nicely?
Yes. That way works too. I've been thinking more of giving the user a chance to enter the proper name right from the start based on what @DominiqueFuchs wrote in Why should this be necessary
I have been needing to move my locallly synced folder, and have found a variety of conflicting information online. Collecting it here in case it helps someone:
- https://docs.nextcloud.com/server/latest/user_manual/en/desktop/faq.html#i-want-to-move-my-local-sync-folder
- https://help.nextcloud.com/t/change-client-folder-sync-location/22170
- https://help.nextcloud.com/t/rename-local-nextcloud-folder/146126/4
- https://help.nextcloud.com/t/renaming-shared-folder-update-problem/8787
Thanks @ph818 for adding these links here. It seems like the method of removing the account from the client and re-adding it to select an existing directory does not work anymore. In my case with client version 33.0.5 on macOS, it opens a browser window to let me authenticate, but there is no option to select the local folder to sync to.
I've changed the domain name of my instance and now have the existing Nextcloud data from the old domain in my home directory (~/Nextcloud), and when I add the account with the new domain name in the client it puts everything under ~/Library/CloudStorage, although the data is of course identical.
Was this a change made in a recent client version, that there is no option anymore to manually select the local Nextcloud folder location?