diff --git a/pisi/constants.py b/pisi/constants.py index f101d93c..f96d1e5b 100644 --- a/pisi/constants.py +++ b/pisi/constants.py @@ -50,6 +50,8 @@ class Constants: # suffix for lzma self.__c.lzma_suffix = ".lzma" + self.__c.partial_suffix = ".part" + # suffix for auto generated debug packages self.__c.debug_name_suffix = "-dbginfo" self.__c.debug_file_suffix = ".debug" diff --git a/pisi/fetcher.py b/pisi/fetcher.py index a0a37eb5..0d48d6d3 100644 --- a/pisi/fetcher.py +++ b/pisi/fetcher.py @@ -54,7 +54,7 @@ class UIHandler: def start(self, archive, url, basename, size, text): if os.path.exists(archive): self.exist_size = os.path.getsize(archive) - self.filename = basename + self.filename = util.remove_suffix(ctx.const.partial_suffix, basename) self.url = url self.basename = basename self.total_size = size or 0 @@ -114,7 +114,7 @@ class Fetcher: self.url = url self.destdir = destdir self.archive_file = os.path.join(self.destdir, self.url.filename()) - self.partial_file = self.archive_file + '.part' + self.partial_file = self.archive_file + ctx.const.partial_suffix self.progress = None util.check_dir(self.destdir)