File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,10 @@ def wait_for_unlock():
5252 while manifest_lock :
5353 pass
5454
55- # TODO error with some moves
5655def 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 ()
You can’t perform that action at this time.
0 commit comments