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

Project folder can't be on different volume than Environment.SpecialFolder.Personal #26

Closed ekw closed 12 years ago

ekw commented 12 years ago

I wanted my project folder to be on my D: drive, so in config.xml, I set folders_path to a directory on my D: drive. But when adding a remote folder, I get an exception saying, "Source and destination path must have identical roots. Move will not work across volumes".

This is because the .tmp folder is on my C: drive (in C:\users\documents\sparkleshare). When sparkleshare then tries to move the tmp project folder from C: to D:, the Directory.Move() command throws the above-mentioned exception at SparkleControllerBase.cs, FetchFolder() function, line 1077.

I provided a fix at https://github.com/ewongemb/SparkleShare. I made it possible to specify the HomePath in config.xml. By setting the HomePath to be on my D: drive (which is what I wanted anyway), the Directory.Move() command is again successful. Perhaps a better solution when the tmp folder and project folders are on different volumes is to do a copy-delete, but I didn't want to get involved yet in what to do if the copy fails mid-stream.

I am using MS VS2010, so in loading the project, some project and resource files were automatically updated. The only real code changes are in SparkleLib/SparkleConfig.cs and SparkleLib/SparklePath.cs. However, the normal build procedure as documented on your wiki still works with the updated project files.

I'm new to SparkleShare, git and github, so not sure if this is the proper way to report issues for the project. Let me know if you want me to do it another way.

wimh commented 12 years ago

I took a quick look, and the change looks good to me. I will let you know later how and when I will merge this.

A copy-delete is maybe not a better solution, it takes more time, and more things can go wrong as you already noticed.

hbons commented 12 years ago

I've merged this one into my master branch.

wimh commented 12 years ago

closing because fix is merged