pydio / pydio-sync

Python version of the Pydio synchronization client
https://pydio.com
GNU General Public License v3.0
82 stars 32 forks source link

Files and folders with trailing point in filename sync issue in Windows #154

Open sespivak opened 7 years ago

sespivak commented 7 years ago

If filename ends with point, Windows creates file, but when sync client gets filename of that file or folder from OS, trailing point cutted. This is the reason of appear duplicates of folders when syncing clients over several OS's.

Example: "Folder." on Linux server "Folder" when synced on Windows "Folder" with same content then uploads to Linux server

In result, Linux server has 2 folders with filenames "Folder" and "Folder." and same content.

If Windows clients considered as important, folders and files with trailing point shouldn't be created. Or when syncing on Windows, filenames with and without trailing points should be considered as same.

7omate commented 7 years ago

Hi, Uhm... Another very tricky problem. Based on this doc we could properly handle names ending with a dot if we used UNC paths (\?\ABSOLUTE_PATH).

In the case of multi OS syncs this raises another question... Should we allow the handling of paths that contain forbidden windows characters (< > ? | / \ : " *) in Pydio knowing that such paths cannot be handled in windows but are fine in Unixes ?

It quickly becomes a mess in which we should error out both between client and server depending on which platform each is running... Then again for all other filenames it's just fine.

Did you try adding the pattern .*\. to the excluded file name in the sync task settings?

sespivak commented 7 years ago

Did you try adding the pattern .*. to the excluded file name in the sync task settings?

No, I did not. If I exclude this files and folders, syncing will not produce duplicates. But: 1) users expects that everything files and folders in repo are synced 2) I can't change default settings for all of my windows users. It's still a problem for me.

7omate commented 7 years ago
  1. For instance, files with a leading dot are not synced
  2. a) To me the right solution would be to create a new type of workspace in Pydio "Windows compatible workspace" that would prevent the use of trailing dots in paths b) I'll look into the feasibility of excluding all paths with a trailing . c) I'll look into the feasibility of actually creating files with trailing . in Windows d) Did you consider the possibility of educating your non windows-users to not finish paths with a dot?