Fixed issue with seperate download path for sftp, ftp & local

Changes:
- fixed issue when updating with the activated option of a seperate download path
- removed leftover debug output
This commit is contained in:
Neocky
2021-06-27 01:46:15 +02:00
parent 2eb4940574
commit 50038c4474
3 changed files with 24 additions and 29 deletions

View File

@@ -29,8 +29,12 @@ def ftp_showPlugins(ftp):
def ftp_upload_file(ftp, itemPath):
configValues = configurationValues()
if configValues.sftp_seperateDownloadPath is True:
uploadFolderPath = configValues.sftp_pathToSeperateDownloadPath
else:
uploadFolderPath = configValues.sftp_folderPath
try:
ftp.cwd(configValues.sftp_folderPath)
ftp.cwd(uploadFolderPath)
itemPath = os.path.relpath(itemPath, 'TempSFTPFolder/')
itemPath = str(itemPath)
currentDirectory = os.getcwd()
@@ -46,7 +50,6 @@ def ftp_upload_file(ftp, itemPath):
def ftp_upload_server_jar(ftp, itemPath):
try:
print(f"itempath: {itemPath}")
ftp.cwd('.')
itemPath = os.path.relpath(itemPath, 'TempSFTPFolder/')
itemPath = str(itemPath)

View File

@@ -37,8 +37,12 @@ def sftp_showPlugins(sftp):
def sftp_upload_file(sftp, itemPath):
configValues = configurationValues()
if configValues.sftp_seperateDownloadPath is True:
uploadFolderPath = configValues.sftp_pathToSeperateDownloadPath
else:
uploadFolderPath = configValues.sftp_folderPath
try:
sftp.chdir(configValues.sftp_folderPath)
sftp.chdir(uploadFolderPath)
sftp.put(itemPath)
except FileNotFoundError: