Posted: 2010-06-22 20:19
How could I prevent that files I upload to the web server to be resized? For example when update the index.html file changes its size from 66.219 to 65.409 bytes on the web server.
Why is that and how I can I avoid this?
The thing about this is that the folders never seem to be synchronized by the difference in file sizes.
WinSCP is really very good, but some things I still do not understand.
Thanks again for any help.
Location: Prague, Czechia
Force binary transfer mode.
Posted: 2010-06-24 13:19
Why is that...
...that type of difference in size is because of line ending conversion. You likely have Windows on your computer & are connecting to a Linux server. Windows's default line ending is CR+LF (carrage return, line feed), Linux is LF...(Mac is CR, if anyone cares)...so that's why the file size changes, WinSCP is converting the line endings for the target system. So that means there were 810 line endings in index.html when you transferred it!
...and how I can I avoid this?
...well, as he said, you can force binary transfer mode, which will stop converting line endings...but you might wanna just leave it as is, cuz it's already "doing the right thing". It wouldn't hurt to transfer a few files binary & make sure they still work on the other side (index.html & simple files like that should be fine). Linux can probably handle Windows line endings, it just doesn't want too (in some cases). I kinda like the smaller files on Linux, saves web-host space! The other solution is to use Notepad2 & create files with Linux line endings, even on Windows, then they are smaller all the time.
You can post new topics in this forum
And it's free!