Skip to content

sftp: Copy file timestamps on push/pull

gentoo-root requested to merge gentoo-root/gvfs:sftp-mtime-fix into master

Copy and move operations preserve file attributes (such as modification time) in most of existing scenarios: local copy/move, remote copy/move, file_copy_fallback in glib. However, one case remains special: copy/move between local and remote (gvfs) locations. It's implemented by push and pull operations in backends, which don't attempt to preserve the usual attributes (e.g., mtime and atime).

This commit implements the missing piece of functionality in sftp backend. Modification time is preserved on copy and move, and access time is preserved on move only, complying to the settable attributes list of sftp backend.

Signed-off-by: Maxim Mikityanskiy maxtram95@gmail.com

Merge request reports