mirror of
https://github.com/KevinMidboe/transatlanticTorrentExpress.git
synced 2025-10-29 09:50:21 +00:00
We collect files to move. Some cases another transfer can start and finish before this instance gets to the file. To not transfere duplicates we now check if the file exists with getFiles before we start a transfere. If its at the remote path we simply continue to the next file.
This commit is contained in:
@@ -33,6 +33,10 @@ def transferFiles(files, localPath, remotePath, host=None, user=None):
|
||||
|
||||
for file in files:
|
||||
logger.info('Moving file: {}'.format(file))
|
||||
if file in getFiles(remotePath, host, user):
|
||||
logger.info('File already exists at remote path. Skipping.')
|
||||
continue
|
||||
|
||||
file = os.path.join(localPath, file)
|
||||
|
||||
if (host and user):
|
||||
|
||||
Reference in New Issue
Block a user