Ulysses

General => Developers Corner => Topic started by: roastchicken on October 03, 2016, 04:29:28 AM

Title: Recommended FTP clients
Post by: roastchicken on October 03, 2016, 04:29:28 AM
Recently I've run into a bit of an issue with my FTP client, WinSCP, activating auto-refresh twice each time I edit a file. I originally thought auto-refresh is just bugged, but after doing a bit of digging I've discovered that it's most likely caused by the way WinSCP saves files. Apparently it's semi-common practice to overwrite a file with nothing, and then write the actual contents. Why this is a thing, I'm not sure. But what I do know is that auto-refresh picks up on this first 'blank slate' write and as a result ends up refreshing the file twice. This makes it difficult to manage modules and includes because they don't take kindly to being run multiple times.

So I'm wondering: has anyone else had this problem? Did you end up fixing it? Was it the FTP client after all, or was there something else to blame?

But mainly, I'm looking for suggestions for good FTP clients (that don't suffer from double-auto-refresh syndrome, ideally). I've heard that FileZilla has file corruption problems, so I'd also like to avoid that if possible.
Title: Re: Recommended FTP clients
Post by: iViscosity on October 03, 2016, 05:45:11 AM
Hm, I've used FileZilla for the past year or so and haven't yet any issues with it personally, and to be honest the only issue is that it drops connection after a few seconds of not doing anything. It reconnects very quickly and correctly after trying to do something, though. Idk I've just not had any problems with it.
Title: Re: Recommended FTP clients
Post by: Stickly Man! on October 03, 2016, 01:36:20 PM
I believe WinSCP will save the file as a temporary file (something like 'Avn23b.tmp'), which once the transfer is complete, is renamed and replaces the original file. This might explain the two auto-refreshes that are triggered.

I've never run into this issue in Gmod per se, as I run a local scrds instance for development on my windows machine.
Title: Re: Recommended FTP clients
Post by: roastchicken on October 03, 2016, 05:22:39 PM
After doing a bit more digging, it turns out that WinSCP's FTP implementation is just an embedded version of FileZilla. So I imagine any weird temporary file stuff that WinSCP does, FileZilla probably does as well.

I believe WinSCP will save the file as a temporary file (something like 'Avn23b.tmp'), which once the transfer is complete, is renamed and replaces the original file.

Interesting. That would make more sense than wiping the file and then writing to it, as I imagine that would be prone to data loss if the connection were to be lost.