diff options
| author | 2024-03-08 16:55:32 +0800 | |
|---|---|---|
| committer | 2024-03-08 16:55:32 +0800 | |
| commit | bf777083d9b73a2e9379a0f5e491119903fd0beb (patch) | |
| tree | 61d8ee3f95c7c919002d1918128510289ae5d538 /src | |
| parent | a3c01c905ea4466b1030006f7d21e59edf163236 (diff) | |
| download | ipm-bf777083d9b73a2e9379a0f5e491119903fd0beb.tar.gz ipm-bf777083d9b73a2e9379a0f5e491119903fd0beb.zip | |
feat(freeze): use new format of ipk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ipm/utils/freeze.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ipm/utils/freeze.py b/src/ipm/utils/freeze.py index 10fce1f..0972308 100644 --- a/src/ipm/utils/freeze.py +++ b/src/ipm/utils/freeze.py @@ -83,8 +83,10 @@ def extract_ipk( update(f"解压 [blue]{ifp_path}[/blue]...", echo) _freeze.extract_tar_gz(str(ifp_path), str(temp_path)) - temp_pkg = InfiniProject(temp_path) - dist_pkg_path = dist_path / temp_pkg.name + + arc_path = next(temp_path.iterdir()) + temp_pkg = InfiniProject(arc_path) + dist_pkg_path = dist_path.joinpath(temp_pkg.default_name) success( f"[bold green]{temp_pkg.name}[/bold green] [yellow]{temp_pkg.version}[/yellow] 已解压至缓存目录.", echo, @@ -99,10 +101,11 @@ def extract_ipk( success("旧规则包项目文件清理完毕.", echo) update(f"迁移文件至目标目录...", echo) - shutil.move(temp_path, dist_pkg_path) + shutil.move(arc_path, dist_path) success(f"文件已迁移至 [blue]{dist_pkg_path}[/blue].", echo) update(f"清理临时文件...", echo) temp_dir.cleanup() success(f"临时文件清理完毕.", echo) + print("??") return InfiniProject(dist_pkg_path) |
