desktop
desktop copied to clipboard
"File contains trailing spaces and could not be renamed, because a file with the same name already exists locally." on next sync after renaming folders on server.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Expected behaviour
I synced a new Windows computer with my Nextcloud account. I received a bunch of errors during the synchronization because some files and folders were using filenames that are valid in Linux but not in Windows. For instance, filenames with trailing whitespaces, colons or same name in different capitalization.
So I decided to manually rename those items to meet Windows' standard, directly on the filesystem (external storage), and let Nextcloud rescan for these items.
Actual behaviour
The problem comes the next time I used my Linux computer. Nexcloud tried to sync those changes, but I got a lot of messages in the desktop client saying the following:
I believe what this means is that a folder in my filesystem was previously sync, nextcloud already removed the trailing whitespaces, and now is trying to sync the changes and finds out that file already exists. Essentially, a folder becomes duplicated, since the old one cannot be renamed, because the new name already exists.
By the way, I'm using the virtual filesystem in both operating systems, and the files are located on external storage.
Is there any way to force the synchronization and get rid of these messages? Other than manually removing these files one by one on the local filesystem?
Steps to reproduce
- Sync Nextcloud with Linux computer (using virtual filesystem)
- Rename a folder with trailing whitespaces (outside nextcloud) to remove them. Wait until Nextcloud finds those changes: _e.g.: "My cat " to "My cat"
- Wait until Nextcloud syncs again in Linux computer
Client configuration
Client version: 3.4.1 (Ubuntu)
Operating system: Ubuntu 20.04 LTS
OS language: Catalan
Qt version used by client package (Linux only, see also Settings dialog):
Client package (From Nextcloud or distro) (Linux only):
Installation path of client:
Server configuration
Nextcloud version: 23.0.0 (Nextcloud Hub II)
Storage backend (external storage): sftp
Logs
Please use Gist (https://gist.github.com/) or a similar code paster for longer logs.
-
Client logfile: Since 3.1: Under the "General" settings, you can click on "Create Debug Archive ..." to pick the location of where the desktop client will export the logs and the database to a zip file. On previous releases: Via the command line:
nextcloud --logdebug --logwindowornextcloud --logdebug --logfile log.txt(See also https://docs.nextcloud.com/desktop/3.0/troubleshooting.html#log-files) -
Web server error log:
-
Server logfile: nextcloud log (data/nextcloud.log):
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
bump
This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!
Same here, reproducible on two different machines.
When I manually delete the folder with the trailing space in the name, it get re-created. And what is strange: The folder name as it is on the server does not have a trailing space .
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
bump
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This problem is still present in client 3.5.2
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
The problem is still present in client 3.5.4
Not sure if this necessarily helps you out, but here was my solution.
The pop-up dialog for Nextcloud Desktop didn't show the actual item that had a leading space. I was shown the full invalid filepaths of the files when I opened up the Settings window.
Since I found the file is a duplication of another file with the same name (but no leading space), I deleted the file on the web gui. Since that change didn't sync over to the desktop client correctly, I deleted the file from the directory it was in, and the client was no longer complaining.
here was my solution
I tried that and am still getting a "conflict". The file no longer exists on my local drive or the server, yet the yellow warning message still comes up saying that there's an invalid name (leading spaces in my case).
I have tried renaming the file from the dialog that comes up when you click on the warning. I have tried renaming the file manually, both locally and remotely.
When using the dialog to rename, the rename happens successfully, the corrected file (and name) gets synced to the server nicely, but the warning still persists.
I have even tried deleting the entire containing folder, both locally and remotely - but it's still warning me to rename the file.
I found a very similar issue with case sensitivity. If someone from a Linux machine renamed a file or folder from lowercase to uppercase, the changes will get sync'd to the server. However, in a Windows machine that will show an error, since Windows cannot rename the same file/folder with the same name but with different case, since it considers it's still the same name.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
I ended up deleting my entire local folder and re-syncing the 1.8GB over 3 days to solve this issue. There was nothing I could to do clear the error, no matter what I tried on the local machine to rename, delete, move, etc., the "offending" file. On a different machine, everything synced fine, given that the file just did not exist on the server and it appeared to be just a stale entry in the sqlite3 db.
We are seeing this exact same issue as all the above mentioned items above. We have up to 60 clients syncing various windows and MAC clients. I might add we have also seen issues surrounding renaming files with capitalization. ie. Myfile.pdf to myfile.pdf. The result is either duplicated files, which produces errors or the file is removed from storage, but a reference remains in the file structure.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This bug is still present in the 3.6.4. Please, do not mark it as stale.
This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!
This is still an issue, please reopen.
Any news on this issue? Every time someone changes the capitalization of a file/folder in a linux computer, it causes synchronization errors in the Windows client, and it's a pain to fix manually every time. I think the client should be smart enough to resolve these renaming issues by itself.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
The issue is still present in the latest version of the client.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This bug is still a current issue. Please, reopen.
Very annoying bug. Someone will fix this or what? If file name ends with a space, it wont sync.
I have seen this bug several times in the last couple of weeks.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!
This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!
You f kidding me?