diff --git a/download-deps.py b/download-deps.py index 66bb0f466b..800bc3dcbe 100755 --- a/download-deps.py +++ b/download-deps.py @@ -95,7 +95,10 @@ 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 - self._extracted_folder_name = os.path.join(self._workpath, self._repo_name + '-' + self._current_version) + 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: data = self.load_json_file(version_path) diff --git a/tools/make-package/git-archive-all b/tools/make-package/git-archive-all index 82215a4e33..30bf69fcbc 100755 --- a/tools/make-package/git-archive-all +++ b/tools/make-package/git-archive-all @@ -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 - extra_folder_name = zip_config["repo_name"] + '-' + zip_config["version"][1:] + 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)