mirror of https://github.com/axmolengine/axmol.git
fix folder error if path is not start with v (#19328)
This commit is contained in:
parent
8d9bd925c9
commit
e991fd392c
|
@ -95,6 +95,9 @@ class CocosZipInstaller(object):
|
|||
self._url = data["repo_parent"] + self._repo_name + '/archive/' + self._filename
|
||||
self._zip_file_size = int(data["zip_file_size"])
|
||||
# 'v' letter was swallowed by github, so we need to substring it from the 2nd letter
|
||||
if self._current_version[0] == 'v':
|
||||
self._extracted_folder_name = os.path.join(self._workpath, self._repo_name + '-' + self._current_version[1:])
|
||||
else:
|
||||
self._extracted_folder_name = os.path.join(self._workpath, self._repo_name + '-' + self._current_version)
|
||||
|
||||
try:
|
||||
|
|
|
@ -234,7 +234,10 @@ class GitArchiver(object):
|
|||
extra_to_zip_file = zip_file["extract_to_zip_path"]
|
||||
zip_file_path = os.path.join(zip_file["zip_file_path"], zip_file_name)
|
||||
# 'v' letter was swallowed by github, so we need to substring it from the 2nd letter
|
||||
if zip_config["version"][0] == 'v':
|
||||
extra_folder_name = zip_config["repo_name"] + '-' + zip_config["version"][1:]
|
||||
else:
|
||||
extra_folder_name = zip_config["repo_name"] + '-' + zip_config["version"]
|
||||
extra_folder_path = os.path.join(self.main_repo_abspath, extra_folder_name)
|
||||
extra_folders.append(extra_folder_path)
|
||||
extra_file_paths = self.unpack_zipfile(zip_file_path, self.main_repo_abspath)
|
||||
|
|
Loading…
Reference in New Issue