Updated for replace method

This commit is contained in:
Dimitris Zlatanidis 2023-04-30 21:23:33 +03:00
parent b6dece1928
commit e0f8789061

View file

@ -53,8 +53,8 @@ class Downloader(Configs):
filename: str = unquote(Path(path).name)
if url.startswith('file'):
shutil.copy2(Path(url[7:]), self.tmp_slpkg)
print(f'{self.byellow}Copying{self.endc}: {Path(url[7:])} -> {self.tmp_slpkg}\n')
shutil.copy2(Path(url.replace('file:', '')), self.tmp_slpkg)
print(f"{self.byellow}Copying{self.endc}: {Path(url.replace('file:', ''))} -> {self.tmp_slpkg}\n")
else:
if self.downloader in ['wget', 'wget2']:
command: str = f'{self.downloader} {self.wget_options} --directory-prefix={self.path} "{url}"'