Skip to content

Commit 6867e71

Browse files
committed
v1.0
1 parent eeebcf8 commit 6867e71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ def wait_for_unlock():
5252
while manifest_lock:
5353
pass
5454

55-
# TODO error with some moves
5655
def has_checkedout_child(folder_dict):
5756
mag = []
57+
if folder_dict == None:
58+
return False
5859
for key in folder_dict:
5960
if key not in ["__file__type__","__locked__","__rev_dbs__"]:
6061
mag.append(folder_dict[key])
@@ -197,8 +198,8 @@ def move():
197198
return "PROJECT_DOES_NOT_EXIST"
198199
if not is_authorized(project,auth.current_user()):
199200
return "UNAUTHORIZED"
200-
source_path_list = sanitize_path(request_data['source_path'])
201-
dest_path_list = sanitize_path(request_data['dest_path'])
201+
source_path_list = sanitize_path(request_data['source_path'][:-1]) + [request_data['source_path'][-1].replace("..","")]
202+
dest_path_list = sanitize_path(request_data['dest_path'][:-1]) + [request_data['dest_path'][-1].replace("..","")]
202203
source_path = os.path.join(f"/opt/data/",os.path.join(*source_path_list))
203204
dest_path = os.path.join(f"/opt/data/", os.path.join(*dest_path_list),source_path_list[-1])
204205
wait_for_unlock()

0 commit comments

Comments
 (0)