mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Fixed issue with ftp temp folder
The ftp files wouldn't get downloaded in the TempSFTPFolder and this would result in a crash
This commit is contained in:
parent
30f0dd91ac
commit
1fda453bbd
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user