wimh / SparkleShare

SparkleShare is a file sharing and collaboration tool inspired by Dropbox.
http://www.sparkleshare.org/
GNU General Public License v3.0
39 stars 6 forks source link

Syncing when conflict occurs fails #9

Closed andremue closed 13 years ago

andremue commented 13 years ago

If a conflict occurs and one of the files is renamed, the file name contains a colon. Because under Windows, colons are forbidden in file names, GIT don't sync the corresponding file. On my system the size of the file is 0 bytes and the file name ends after the hour of the timestamp.

To fix this, the timestamp in https://github.com/wimh/SparkleShare/blob/windows/SparkleLib/Git/SparkleRepoGit.cs#L325 could be changed to:

string timestamp            = DateTime.Now.ToString ("HH-mm MMM d");

or

string timestamp            = DateTime.Now.ToString ("HHmm MMM d");
andremue commented 13 years ago

Problems can also arise through a username with one of these characters: \ / : * ? " < > | I don't know whether that will checked at the moment?

hbons commented 13 years ago

Fixed in my repo: https://github.com/hbons/SparkleShare/commit/a0db35d8772f6dd9c92ea74b20fd77936576088c Used and "h" as separator so you can still guess it's a time.

wimh commented 13 years ago

@hbons, thanks for the fix! cherry picked it in fcca840655a4a9492072

@andremue, thanks for reporting, I have put the checking of those characters in the username on my todo list.