mar10 / pyftpsync

Synchronize directories using FTP(S), SFTP, or file system access.
https://pyftpsync.readthedocs.io
MIT License
117 stars 25 forks source link

download copies older local file in wrong direction #6

Closed Paul424 closed 9 years ago

Paul424 commented 9 years ago

When i run pyftpsync --verbose --progress download -x (where the remote is a readonly ftp target) then an error is hit saying the dest is readonly (duhhh). I believe the error is in synchronizers.py line 981. The implementation of sync_older_local_file for DownloadSynchronizer should be:

def sync_older_local_file(self, local_file, remote_file): if self._check_del_unmatched(local_file): return False self._log_action("copy", "modified", "<", local_file) self._copy_file(self.remote, self.local, remote_file)

and not:

def sync_older_local_file(self, local_file, remote_file): if self._check_del_unmatched(local_file): return False self._log_action("copy", "modified", "<", local_file) self._copy_file(self.local, self.remote, remote_file)

mar10 commented 9 years ago

Closed by #7, thanks