diff --git a/src/handlers/handle_ftp.py b/src/handlers/handle_ftp.py index df84be9..2abb289 100644 --- a/src/handlers/handle_ftp.py +++ b/src/handlers/handle_ftp.py @@ -136,22 +136,24 @@ def ftp_list_files_in_server_root(ftp): rich_print_error("Error: [FTP]: No Serverjar was found.") -def ftp_download_file(ftp, path_download, file) -> None: +def ftp_download_file(ftp, file) -> None: """ Download a file of the ftp server :param ftp: ftp connection - :param path_download: Path to save downloaded file to :param file: File to download :returns None """ config_values = config_value() ftp.cwd(config_values.remote_plugin_folder_on_server) + current_directory = os.getcwd() + os.chdir('TempSFTPFolder') filedata = open(path_download,'wb') ftp.retrbinary('RETR '+file, filedata.write) filedata.close() ftp.quit() + os.chdir(current_directory) return None