nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.07k stars 804 forks source link

Rename with only case change fails in Windows client #3943

Open joholm2 opened 3 years ago

joholm2 commented 3 years ago

How to use GitHub

Expected behaviour

Renaming a file where the only change is the case of letters should work

Actual behaviour

Rename of a file where the only change is the case of one or more letters results in a sync failure for that file.

Steps to reproduce

  1. Create a file eg, "abc.txt" and wait for it to sync
  2. Rename the file to eg "Abc.txt"
  3. Observe the result

Client configuration

3.3.6 (Windows)

Operating system: Windows 10

Server configuration

Nextcloud version: 22.2.0

(Log files can be provided is fault not easily reproduced)

claell commented 3 years ago

I recently also had this problem, but I think not with Nextcloud, but another application (RaiDrive) that integrates into Windows Explorer. Might be a broader problem.

joholm2 commented 3 years ago

I created a file "Testfile.txt" and renamed it in Windows Explorer to "testfile.txt".

Here is the log file filtered by selecting all lines containing the word "Textfile" or "textfile".

Change_case_log.txt

From what I can see, Nextcloud client tries to carry out a rename but starts mentioning that "Testfile.txt" is blacklisted so renaming fails.

Maybe someone can get a clearer view of what happens from the log.

splitt3r commented 3 years ago

That's how Windows is supposed to work (see https://docs.microsoft.com/en-us/windows/wsl/case-sensitivity).

You can do sth. like Test.txt -> Test1.txt -> test.txt.

joholm2 commented 3 years ago

That's how Windows is supposed to work (see https://docs.microsoft.com/en-us/windows/wsl/case-sensitivity).

You can do sth. like Test.txt -> Test1.txt -> test.txt.

Hi splitt3r, thanks but I think you miss the point.

I know there are "work arounds" but a) we shouldn't need them and b) there are situations they are not practical or efficient

But most importantly - it doesn't help to say "this is how Windows works".

This is not about Windows. This is about Nextcloud.

Nextcloud has to work with/on Windows Nextcloud "knows" how Windows works and should handle all situations gracefully.

It shouldn't get muddled, talk of "black-listed" files in the log and end up marking a file as unsync-able.

Even though Windows treats different case as "the same" the case has clearly changed and both Windows and Nextcloud clearly "see" the new case in the text of the filename. The log even shows that a rename is detected.

All Nextcloud has to do is rename the file on the server.

Just think about it - even Windows File-explorer allows me to change the case in the filename.

The is no excuse for this bug.

claell commented 3 years ago

I guess the important thing here is that Windows Explorer normally can rename those files, so the user expects this to work also with other apps integrated there.

joholm2 commented 2 years ago

Hi, I've waited patiently for almost 8 months now. Does anyone have any insight into when this might be fixed?

tomasz-lasko commented 2 years ago

I am also reporting that THIS BUG IS IMPORTANT because, when I encountered it then it blocked syncing for a user (or perhaps other users too!), and all because a user performs a normal "rename" operation (and they should not be instructed to avoid this operation).

So the whole company could not work because of such a silly thing!!!

And it happened more than once, and probably will come back. So I am reporting it after some time and I try to remind myself the details saw this bug in recent weeks, so it was Desktop version 3.x (on Windows 10) and Server version probably 22.2.3.

Reproduce

  1. Set up Windows Desktop client and sync. Perform the below steps either in desktop client or in the server (probably both, or one of them, I don't remember exactly)
  2. Create a folder with uppercase name (probably file too), e.g. MYFOLDER
  3. Wait for it to sync (client-server)
  4. Rename the folder to other case name but exact same letters (so exactly the same name, only letter case changes), e.g. myfolder
  5. Now nextcloud sync gets stuck and stops working, probably in other clients too (I am not sufre if I remember correctly).
  6. However if you perform an intermediate step, then it is OK (create MYFOLDER > sync > rename to MYFOLDER-TMP > sync > rename to myfolder > sync > ok)

Expected behaviour

Normal rename operation (MYFOLDER > myfolder) should not cause any trouble, regardless if it is made.