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 Synchronizer tries to upload when local file is older than remote #23

Closed romankor closed 6 years ago

romankor commented 6 years ago

I think there is bug , the Download synchronizer tries to upload to remote an older local file, unless i don't get and it should be like that , but the remote should be not writable at all when using the Download Syncronizer

    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)

should be the opposite i guess

    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)
mar10 commented 6 years ago

Which version are you using? 2.0 is available as beta candidate, so you could help testing this version (note however that the meta file formats are incompatible, so it should not be in production. You also need to pass ––pre to pip)

romankor commented 6 years ago

Yes was using 1.0.x .. Looks working in the 2.0.0 , will use it

mar10 commented 6 years ago

Thanks for the feedback