- Add .part to constants
- urlgrabber does not send the url anymore it returns the given file to the progress class, so .part suffix should be removed
This commit is contained in:
@@ -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"
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user