diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index 6d2ff1e4..ad0ae5fb 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -147,10 +147,12 @@ class Slackbuilds(Configs): path_ponce_repo_package = Path(self.ponce_repo_path, location, sbo) path_build_package = Path(self.build_path, sbo) - shutil.copytree(path_ponce_repo_package, f'{self.build_path}{sbo}') - slackbuild = Path(path_build_package, f'{sbo}.SlackBuild') - os.chmod(slackbuild, 0o775) - + if path_ponce_repo_package.is_dir(): + shutil.copytree(path_ponce_repo_package, f'{self.build_path}{sbo}') + slackbuild = Path(path_build_package, f'{sbo}.SlackBuild') + os.chmod(slackbuild, 0o775) + else: + raise SystemExit(f"Error: path {path_ponce_repo_package} does not exist.") else: sbo_url: str = f'{self.sbo_repo_url}{location}/{file}' down_sbo = Downloader(self.tmp_slpkg, sbo_url, self.flags)