Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,15 @@ def handle_zip_package(archive_filename, bsp_package_path, package_name, package
for item in arch.namelist():
arch.extract(item, package_temp_path)
if not os.path.isdir(os.path.join(package_temp_path, item)):
if is_windows():
right_path = item.replace('/', '\\')
else:
right_path = item

# Gets the folder name and changed folder name only once
if flag:
package_folder_name = right_path.split('\\')[0]
package_folder_name = item.split('/')[0]
package_name_with_version = package_name + '-' + package_version
flag = False
if is_windows():
right_path = item.replace('/', '\\')
else:
right_path = item

right_name_to_db = right_path.replace(package_folder_name, package_name_with_version, 1)
right_path = os.path.join("package_temp", right_path)
Expand Down