pyftpsync icon indicating copy to clipboard operation
pyftpsync copied to clipboard

Do not upload files because parent folder have same timestamp

Open obook opened this issue 5 months ago • 0 comments

Hello. The UploadSynchronizer don't upload for new files because the remote parent folder retains the same date.

How can I work around this issue?

I have tried the force option without success. I am using pyftpsync in a Python script on GitLab.

Thank you for your help.

@B.

import os
from ftpsync.targets import FsTarget
from ftpsync.ftp_target import FTPTarget
from ftpsync.synchronizers import UploadSynchronizer

host = os.environ['FTP_ADDRESS']
user = os.environ['FTP_USER']
passwd = os.environ['FTP_PASSWORD']

local = FsTarget("/builds/xxxxxxxx/xxxxxxxx/public")

remote = FTPTarget("/gitlab/mathematiques-2e", host, username=user, password=passwd)
opts = {"force": True, "delete_unmatched": True, "verbose": 5}
s = UploadSynchronizer(local, remote, opts)
s.run()

Log

INFO:pyftpsync:EQUAL             =  [P1-Nombres_et_calculs]  # P1-Nombres_et_calculs contain updated files

obook avatar Aug 05 '25 12:08 obook