@@ -455,11 +455,16 @@ def _disassemble(self) -> bool:
455
455
else : # Dir mode.
456
456
files_to_manage = []
457
457
os .makedirs (txt_file , exist_ok = True )
458
+ falkeze = len (mes_file .split (os .sep ))
458
459
for root , dirs , files in os .walk (mes_file ):
459
460
for file_name in files :
460
461
new_file_array = [] # mes_file, txt_file
461
462
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 )))
463
468
rel_mes_name = os .path .normpath (os .path .join (mes_file , basic_path ))
464
469
rel_txt_name = os .path .normpath (os .path .join (txt_file , os .path .splitext (basic_path )[0 ] + ".txt" ))
465
470
@@ -528,11 +533,12 @@ def _assemble(self) -> bool:
528
533
else : # Dir mode.
529
534
files_to_manage = []
530
535
os .makedirs (txt_file , exist_ok = True )
536
+ falkeze = len (txt_file .split (os .sep ))
531
537
for root , dirs , files in os .walk (txt_file ):
532
538
for file_name in files :
533
539
new_file_array = [] # mes_file, txt_file
534
540
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 :])
536
542
rel_mes_name = os .path .normpath (os .path .join (mes_file , os .path .splitext (basic_path )[0 ] + ".MES" ))
537
543
rel_txt_name = os .path .normpath (os .path .join (txt_file , basic_path ))
538
544
@@ -605,6 +611,8 @@ def _get_mes_and_txt(self) -> tuple:
605
611
status = False
606
612
showwarning (title = self ._strings_lib [self ._language ][22 ],
607
613
message = self ._strings_lib [self ._language ][24 ])
614
+ mes_file = os .path .abspath (mes_file )
615
+ txt_file = os .path .abspath (txt_file )
608
616
return mes_file , txt_file , status
609
617
610
618
# Language technical methods.
0 commit comments