This commit is contained in:
Pavel Yakunin 2016-06-05 22:32:26 +03:00
parent 18e341d650
commit 43d6077815

View File

@ -1105,7 +1105,7 @@ def upload():
flash("Failed to create path %s (Permission denied)." % filepath, category="error")
return redirect(url_for('index'))
try:
move(meta.file_path, saved_filename) #remove as well
move(meta.file_path, saved_filename)
except OSError:
flash("Failed to store file %s (Permission denied)." % saved_filename, category="error")
return redirect(url_for('index'))