Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Problem syncing files with trailing spaces to Windows #28
On GNU/Linux (at least when using the ext2 (or 3 or 4) file system), every character is allowed in a file or directory name. On Windows, there are many constraints and it seems that even a trailing space makes problems (see error below).
We should somehow try to handle this in a user-friendly way. Currently, it is blocking the synchronisation completely, affecting other files and directories. The cleanest way to handle this would probably be to remove or replace all characters that are illegal in the destination and map this new file name to the old one (so that the work-around stays limited to the system where the problem exists).
So for example, the file "abc?def" would be mapped to the renamed file "abc_def" on Windows. On GNU/Linux, it would still be named "abc?def". Changes to the file should not cause the file name to be changed on GNU/Linux!
Maybe we should encode the illegal character (e.g. "?" => "%3F" [its hex-code]) instead of replacing it to make collisions less probable.
Here's the error concerning a trailing space (but it surely affects other characters, too):
2014-05-05 10:09:30,357 [main] ERROR c.c.c.c.CloudStoreClient - java.nio.file.InvalidPathException: Trailing char < > at index 96: C:\SecuCloudDrive\2014-04-25_Projektbeschreibung\ file name with spaces at beginning and end