File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ def _pack_names_and_files(self) -> tuple:
7171
7272 rel_name = os .path .normpath (os .path .join (root , filename ))
7373 end_name = rel_name
74- if rel_name .startswith (root + os .sep ):
75- end_name = rel_name [len (root + os .sep ):]
74+ if rel_name .startswith (self ._dir_name + os .sep ):
75+ end_name = rel_name [len (self ._dir_name + os .sep ):]
76+ end_name = end_name .replace (os .sep , '/' )
7677 encrypted_name = self .encrypt_name (end_name )
7778
7879 with open (rel_name , 'rb' ) as this_file :
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ def test(mode: str):
77 from ai6win_arc import AI6WINArc
88 """modes: unpack, pack,"""
99 if mode == "unpack" :
10- test_arc = AI6WINArc ("Data .arc" , "Data " , integrity_check = True )
10+ test_arc = AI6WINArc ("mes .arc" , "mes " , integrity_check = True )
1111 test_arc .unpack ()
1212 elif mode == "pack" :
13- test_arc = AI6WINArc ("Data .arc" , "Data " , integrity_check = True )
13+ test_arc = AI6WINArc ("mes .arc" , "mes " , integrity_check = True )
1414 test_arc .pack ()
1515
1616
Original file line number Diff line number Diff line change 88
99
1010executables = [cx_Freeze .Executable ("main.py" ,
11- shortcut_name = "SilkyArcTool " ,
12- shortcut_dir = "SilkyArcTool " ,
13- #base="Win32GUI")
14- ]
11+ shortcut_name = "AI6WINArcTool " ,
12+ shortcut_dir = "AI6WINArcTool " ,
13+ #base="Win32GUI"
14+ ) ]
1515
1616cx_Freeze .setup (
17- name = "SilkyArcTool " ,
18- version = "1.0 " ,
17+ name = "AI6WINArcTool " ,
18+ version = "1.1 " ,
1919 description = "Dual languaged (rus+eng) tool for packing and unpacking archives of Silky Engine.\n "
2020 "Двуязычное средство (рус+англ) для распаковки и запаковки архивов Silky Engine." ,
2121 options = {"build_exe" : {"packages" : []}},
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def _unpack_files(self) -> None:
123123 except AssertionError :
124124 print ("!!! File {0} true size is incorrect!/Истинный размер файла {0} некорректен!" .
125125 format (i [1 ]))
126+ os .makedirs (os .path .dirname (this_file_name ), exist_ok = True )
126127 with open (this_file_name , 'wb' ) as this_file :
127128 this_file .write (new_file_bytes )
128129 if self ._verbose :
You can’t perform that action at this time.
0 commit comments