Commit 560fecd5 by Dányi Bence

store: syntax error, ejnye-bejnye

parent 57483b5b
...@@ -283,7 +283,7 @@ def upload(hash_num): ...@@ -283,7 +283,7 @@ def upload(hash_num):
# Check if upload path valid # Check if upload path valid
if not up_path.startswith('/home'): if not up_path.startswith('/home'):
abort(400, 'Invalid path.') abort(400, 'Invalid path.')
os.remove(ROOT_WWW_FOLDER+'/'+hash_num) os.remove(ROOT_WWW_FOLDER+'/'+hash_num)
# Get the real upload path # Get the real upload path
# Delete the hash link # Delete the hash link
...@@ -300,8 +300,8 @@ def upload(hash_num): ...@@ -300,8 +300,8 @@ def upload(hash_num):
datalength += len(chunk) datalength += len(chunk)
try: try:
redirect_address = request.headers.get('Referer') redirect_address = request.headers.get('Referer')
os.chown(up_path, getpwnam(username).pw_uid, getpwnam(username).pw_gid) os.chown(up_path, getpwnam(username).pw_uid, getpwnam(username).pw_gid)
os.chmod(up_path, 0644) os.chmod(up_path, 0644)
except: except:
redirect_address = REDIRECT_URL redirect_address = REDIRECT_URL
response.set_header('Access-Control-Allow-Origin', '*') response.set_header('Access-Control-Allow-Origin', '*')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment