SFTP plugin preserves modification date while copying

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
MaXyM
Junior Member
Junior Member
Posts: 7
Joined: 2013-05-26, 10:12 UTC

SFTP plugin preserves modification date while copying

Post by *MaXyM »

Hello
yeah... I have a problem with modification date being copied from source file to destination one. I'm facing this problem while uploading smarty templates. In some scenarios smarty it self is not able to recompile template after new tpl uploaded, because template being uploaded remains older than compiled already file.

I would like to allow destination system to set modification datetime in the moment of copying.

Is it possible?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently you can't control this. If you have access to Microsoft Visual C++ 6.0 or newer, you can remove a part of the code and recompile the plugin:

Code: Select all

				while (LIBSSH2_ERROR_EAGAIN==libssh2_sftp_setstat(ConnectSettings->sftpsession,
					thename,&attr)) {
					if (EscapePressed()) {
						ConnectSettings->neednewchannel=true;
						break;
					}
					IsSocketReadable(ConnectSettings->sock);  // sleep to avoid 100% CPU!
				}
If not, I can send you a custom build. Do you need the 32-bit or 64-bit version?
Author of Total Commander
https://www.ghisler.com
MaXyM
Junior Member
Junior Member
Posts: 7
Joined: 2013-05-26, 10:12 UTC

Post by *MaXyM »

You are very kind.
Please send me 64bit version.
thank you.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

May I send it to the e-mail address you used for this forum account?
Author of Total Commander
https://www.ghisler.com
MaXyM
Junior Member
Junior Member
Posts: 7
Joined: 2013-05-26, 10:12 UTC

Post by *MaXyM »

Yes, thank you so much.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It was less work than I thought, so I recompiled both the 32-bit and 64-bit versions to not upload the timestamp. Maybe it will be useful for others too.

Download here:
https://plugins.ghisler.com/fsplugins/sftpplug142notime.zip
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

You should rather add an option for it. It would be easier for the future updates, you wouldn't have to update and release special build. And as a special option, it doesn't necessarily have to be in GUI, just reading it from sftpplug.ini, if user manually added it, would be fine IMHO.
Post Reply