mar10 / pyftpsync

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

Client won't delete local files on "pyftpsync download --delete [...]" #46

Closed dfrison01 closed 4 years ago

dfrison01 commented 4 years ago

Tried with both command line and passing {'delete': True} to DownloadSynchronizer. Using "--resolve=remote" doesn't make any difference with the problem. Python 3.7, server using pyftpdlib.

mar10 commented 4 years ago

The tests seem to pass. Please give more details (command line and output with -vv for a minimal complex scenario) thanks

dfrison01 commented 4 years ago

Hey Martin! Just realized the problem was with the ".pyftpsync-meta.json" files. The company server automatically deletes them after the sync. And then, when I try to download/"clone" the directory again, pyftpsync assumes the files it's supposed to delete are actually "new" files, skipping the deletion (we are talking about download specifically, but the same applies to "upload", obviously). I've searched the docs, but can't find any answers: is there any way to make pyftpsync use a single json for the hole tree, or even store the json at some other arbitrary dir? That would solve the problem. Definitely not a bug. I'm very sorry for the inconvenience! Any help is much appreciated.

mar10 commented 4 years ago

Thanks for reporting the explanation.

There have been similar requests (#19 and #34), so you may give an upvote there. But realistically, given the low resources I can currently invest, I might not address this in the near future (PRs welcome).