SFTP plugin preserves modification date while copying
Moderators: Hacker, petermad, Stefan2, white
SFTP plugin preserves modification date while copying
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?
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?
- ghisler(Author)
- Site Admin
- Posts: 50918
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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:
If not, I can send you a custom build. Do you need the 32-bit or 64-bit version?
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!
}
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50918
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
May I send it to the e-mail address you used for this forum account?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50918
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
Download here:
https://plugins.ghisler.com/fsplugins/sftpplug142notime.zip
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com