From d64923ddad45be763222f95dbc77109c77746ac1 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Tue, 13 Nov 2018 22:38:40 +0100 Subject: [PATCH] Added missing leading slash --- parts/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/server.py b/parts/server.py index f8f6f01..209d9ca 100644 --- a/parts/server.py +++ b/parts/server.py @@ -217,7 +217,7 @@ def alter(partID): datasheet_file = request.files['datasheet-file'] datasheet_filename = secure_filename(datasheet_file.filename) i = 1 - while os.path.isfile('srv/datasheets/' + datasheet_filename): + while os.path.isfile('/srv/datasheets/' + datasheet_filename): datasheet_filename = datasheet_filename[:-4] + str(i) + '.pdf' i += 1 datasheet_file.save('/srv/datasheets/' + datasheet_filename) @@ -248,7 +248,7 @@ def alter(partID): datasheet_file = request.files['datasheet-file'] datasheet_filename = secure_filename(datasheet_file.filename) i = 1 - while os.path.isfile('srv/datasheets/' + datasheet_filename): + while os.path.isfile('/srv/datasheets/' + datasheet_filename): datasheet_filename = datasheet_filename[:-4] + str(i) + '.pdf' i += 1 datasheet_file.save('/srv/datasheets/' + datasheet_filename)