download: fix character "/"

This commit is contained in:
Intel1
2018-03-08 15:59:35 -05:00
committed by GitHub
parent 9ebbf9ee1e
commit 16aae25386

View File

@@ -459,10 +459,12 @@ def download_from_url(url, item):
return {"downloadStatus": STATUS_CODES.error}
# Obtenemos la ruta de descarga y el nombre del archivo
item.downloadFilename = item.downloadFilename.replace('/','-')
download_path = filetools.dirname(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
file_name = filetools.basename(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
# Creamos la carpeta si no existe
if not filetools.exists(download_path):
filetools.mkdir(download_path)