Added missing leading slash

pull/3/head
Davide Bongiovanni 6 years ago
parent a8496af806
commit d64923ddad

@ -217,7 +217,7 @@ def alter(partID):
datasheet_file = request.files['datasheet-file'] datasheet_file = request.files['datasheet-file']
datasheet_filename = secure_filename(datasheet_file.filename) datasheet_filename = secure_filename(datasheet_file.filename)
i = 1 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' datasheet_filename = datasheet_filename[:-4] + str(i) + '.pdf'
i += 1 i += 1
datasheet_file.save('/srv/datasheets/' + datasheet_filename) datasheet_file.save('/srv/datasheets/' + datasheet_filename)
@ -248,7 +248,7 @@ def alter(partID):
datasheet_file = request.files['datasheet-file'] datasheet_file = request.files['datasheet-file']
datasheet_filename = secure_filename(datasheet_file.filename) datasheet_filename = secure_filename(datasheet_file.filename)
i = 1 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' datasheet_filename = datasheet_filename[:-4] + str(i) + '.pdf'
i += 1 i += 1
datasheet_file.save('/srv/datasheets/' + datasheet_filename) datasheet_file.save('/srv/datasheets/' + datasheet_filename)

Loading…
Cancel
Save