Skip to content

Commit 65b944f

Browse files
author
Nicolas
authored
Patch problem of "invalid path"
os.path.join() acts weird when destination starts with a slash. For fix it, I suggest to remove it.
1 parent 8c58c47 commit 65b944f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bridges/python/tornado/filemanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def extract(self, request):
274274

275275
def upload(self, handler):
276276
try:
277-
destination = handler.get_body_argument('destination', default='/')
277+
destination = handler.get_body_argument('destination', default='/')[1:]
278278
for name in handler.request.files:
279279
fileinfo = handler.request.files[name][0]
280280
filename = fileinfo['filename']

0 commit comments

Comments
 (0)