diff --git a/parts/server.py b/parts/server.py index 0e8da1d..06399fd 100644 --- a/parts/server.py +++ b/parts/server.py @@ -207,7 +207,7 @@ def alter(partID): datasheet_file = request.files['datasheet-file'] datasheet_filename = secure_filename(datasheet_file.filename) i = 1 - while os.path.isfile('srv/datasheet/' + 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) @@ -233,7 +233,7 @@ def alter(partID): datasheet_file = request.files['datasheet-file'] datasheet_filename = secure_filename(datasheet_file.filename) i = 1 - while os.path.isfile('srv/datasheet/' + 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)