@@ -231,7 +231,7 @@ def set_file(self, name, path, file_name, nx=False, xx=False, decode_keys=False)
231231 with open (file_name , "r" ) as fp :
232232 file_content = loads (fp .read ())
233233
234- return self .set (name , path , file_content , nx , xx , decode_keys )
234+ return self .set (name , path , file_content , nx = nx , xx = xx , decode_keys = decode_keys )
235235
236236 def set_path (self , json_path , root_folder , nx = False , xx = False , decode_keys = False ):
237237 """
@@ -247,13 +247,20 @@ def set_path(self, json_path, root_folder, nx=False, xx=False, decode_keys=False
247247 set_files_result = {}
248248 for root , dirs , files in os .walk (root_folder ):
249249 for file in files :
250+ file_path = os .path .join (root , file )
250251 try :
251- file_name = os .path .join (root , file ).rsplit ("." )[0 ]
252- file_path = os .path .join (root , file )
253- self .set_file (file_name , json_path , file_path , nx , xx , decode_keys )
254- set_files_result [os .path .join (root , file )] = True
252+ file_name = file_path .rsplit ("." )[0 ]
253+ self .set_file (
254+ file_name ,
255+ json_path ,
256+ file_path ,
257+ nx = nx ,
258+ xx = xx ,
259+ decode_keys = decode_keys ,
260+ )
261+ set_files_result [file_path ] = True
255262 except JSONDecodeError :
256- set_files_result [os . path . join ( root , file ) ] = False
263+ set_files_result [file_path ] = False
257264
258265 return set_files_result
259266
0 commit comments