|
Title: Sync issue Post by: ktwbc on November 19, 2010, 12:27:56 AM Found a bug/problem in sync.
I have two folders -- the server folder is empty. The local folder has files. I do a Sync command, which starts uploading all the files. Let's say it gets about 25% through the first file. For some reason, I have to stop the sync and abort. I start the sync again, it compares the server and the local files. Now, the partially uploaded file, it wants to DOWNLOAD and overwrite my local file -- despite the fact it's only 25% of the completed file.. because the partial upload has a current timestamp on it, hence the sync command sees it as "newer" than the local file. I do note that the sync sets the server datestamp to match the local file, but only after it's completed. During the upload, it's a "current" time which would interfere with this restarting. Title: Re: Sync issue Post by: JD on November 19, 2010, 03:23:46 AM This is an issue which affects Mirror sync only. That is, the sync both uploads AND downloads.
In most cases people use either an Upload sync OR a Download sync and in those scenarios this problem does not occur. The issue is what to do with a Mirror sync in this situation. The setting of server item timestamps could help, but unfortunately most servers don't support this so it can't be relied on. I'll have to think about how to tacle this situation. In the meantime either change to using Upload sync, or don't cancel syncs! ;) Title: Re: Sync issue Post by: ktwbc on November 22, 2010, 07:53:22 PM Okay.
Might I suggest taking a chapter from the playbook of iGet -- when doing a sync, when iGet uploads or downloads a file, the file that's created on the other end is named with the original name plus adding a custom extension (in their case, .iget) on the end of it. When the transfer is complete, it gets renamed to the orignal name (basically removing the extension). The avantage of this is that if the sync fails and is restarted, as the program is going through the filenames, it sees its own extension and recognizes it's a failed attempt and can resume, and not an "ordinary file". (The program also masks this extension so it's not really obvious to the user that it's doing this.) Simple ".yummy" extension would accomplish the same thing. Title: Re: Sync issue Post by: JD on November 23, 2010, 02:21:10 AM Thanks for the suggestion! :)
Sounds pretty messy, especially if anything goes wrong, but I guess it could work. I'll consider it ... maybe as an option. |