File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " socha"
7- version = " 1.0.6 "
7+ version = " 1.0.7 "
88authors = [
99 { name = " FalconsSky" , email = " stu222782@mail.uni-kiel.de" },
1010]
Original file line number Diff line number Diff line change @@ -160,9 +160,13 @@ def _zipdir(self):
160160 zipf = zipfile .ZipFile (f'{ self .build_dir } /{ self .package_name } .zip' , 'w' , zipfile .ZIP_DEFLATED )
161161 for root , dirs , files in os .walk (f'{ self .build_dir } /{ self .package_name } ' ):
162162 for file in files :
163- zipf .write (os .path .join (root , file ))
163+ file_path = os .path .join (root , file )
164+ arc_name = os .path .relpath (file_path , self .build_dir )
165+ zipf .write (file_path , arcname = arc_name )
164166 for _dir in dirs :
165- zipf .write (os .path .join (root , _dir ))
167+ dir_path = os .path .join (root , _dir )
168+ arc_name = os .path .relpath (dir_path , self .build_dir )
169+ zipf .write (dir_path , arcname = arc_name )
166170 zipf .close ()
167171 logging .info (f'{ self .package_name } .zip successfully created!' )
168172 except Exception as e :
You can’t perform that action at this time.
0 commit comments