@@ -455,11 +455,16 @@ def _disassemble(self) -> bool:
455455 else : # Dir mode.
456456 files_to_manage = []
457457 os .makedirs (txt_file , exist_ok = True )
458+ falkeze = len (mes_file .split (os .sep ))
458459 for root , dirs , files in os .walk (mes_file ):
459460 for file_name in files :
460461 new_file_array = [] # mes_file, txt_file
461462
462- basic_path = os .sep .join (os .path .join (root , file_name ).split (os .sep )[1 :])
463+ basic_path = os .sep .join (os .path .join (root , file_name ).split (os .sep )[falkeze :])
464+ print (basic_path )
465+ print (mes_file )
466+ print (os .path .join (mes_file , basic_path ))
467+ print (os .path .normpath (os .path .join (mes_file , basic_path )))
463468 rel_mes_name = os .path .normpath (os .path .join (mes_file , basic_path ))
464469 rel_txt_name = os .path .normpath (os .path .join (txt_file , os .path .splitext (basic_path )[0 ] + ".txt" ))
465470
@@ -528,11 +533,12 @@ def _assemble(self) -> bool:
528533 else : # Dir mode.
529534 files_to_manage = []
530535 os .makedirs (txt_file , exist_ok = True )
536+ falkeze = len (txt_file .split (os .sep ))
531537 for root , dirs , files in os .walk (txt_file ):
532538 for file_name in files :
533539 new_file_array = [] # mes_file, txt_file
534540
535- basic_path = os .sep .join (os .path .join (root , file_name ).split (os .sep )[1 :])
541+ basic_path = os .sep .join (os .path .join (root , file_name ).split (os .sep )[falkeze :])
536542 rel_mes_name = os .path .normpath (os .path .join (mes_file , os .path .splitext (basic_path )[0 ] + ".MES" ))
537543 rel_txt_name = os .path .normpath (os .path .join (txt_file , basic_path ))
538544
@@ -605,6 +611,8 @@ def _get_mes_and_txt(self) -> tuple:
605611 status = False
606612 showwarning (title = self ._strings_lib [self ._language ][22 ],
607613 message = self ._strings_lib [self ._language ][24 ])
614+ mes_file = os .path .abspath (mes_file )
615+ txt_file = os .path .abspath (txt_file )
608616 return mes_file , txt_file , status
609617
610618 # Language technical methods.
0 commit comments