putdotio / putio-sync

Command-line program to sync a folder between put.io and your computer.
https://put.io
MIT License
54 stars 9 forks source link

Windows does not allow for a colon in the file name, and this will cause the sync to hault #48

Closed bryancasler closed 1 year ago

bryancasler commented 1 year ago

Windows will not allow for a colon in a path or file name, among others. If that happens the sync errors out and grinds to a stop. Was unsure if this belonged in the putio-sync or putio-sync-desktop repo so I've posted it in both.

Two changes could be made to address this:

1) Remove colons.

2) When this error is encountered, log it, and continue to the next file

This is the full list of restricted characters that can not be in a path or file URL on Windows. In practice, all of them should be removed.

Source: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions

cenkalti commented 1 year ago

For now I chose to skip syncing the files containing restricted characters because it was simple and easy. If there will be demand for it we can think of a more complex solution.