[appimage] fix: not able to import AppImage files (regression from 0.9.21)

This commit is contained in:
Vinicius Moreira
2021-11-25 14:03:47 -03:00
parent e2b10903c0
commit dc6c2cbe7a
2 changed files with 59 additions and 57 deletions

View File

@@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- AppImage - AppImage
- trying to download a file without a URL associated with [#210](https://github.com/vinifmor/bauh/issues/210) - trying to download a file without a URL associated with [#210](https://github.com/vinifmor/bauh/issues/210)
- regression: not able to import AppImage files (introduced in **0.9.21**)
- Arch - Arch
- **wget** as a hard requirement for Arch package management - **wget** as a hard requirement for Arch package management

View File

@@ -566,18 +566,19 @@ class AppImageManager(SoftwareManager):
downloaded, file_name = True, pkg.local_file_path.split('/')[-1] downloaded, file_name = True, pkg.local_file_path.split('/')[-1]
file_path = out_dir + '/' + file_name install_file_path = out_dir + '/' + file_name
try: try:
moved, output = handler.handle_simple(SimpleProcess(['mv', pkg.local_file_path, file_path])) moved, output = handler.handle_simple(SimpleProcess(['mv', pkg.local_file_path, install_file_path]))
except: except:
self.logger.error("Could not rename file '' as '{}'".format(pkg.local_file_path, file_path)) output = ''
self.logger.error("Could not rename file '' as '{}'".format(pkg.local_file_path, install_file_path))
moved = False moved = False
if not moved: if not moved:
watcher.show_message(title=self.i18n['error'].capitalize(), watcher.show_message(title=self.i18n['error'].capitalize(),
body=self.i18n['appimage.install.imported.rename_error'].format( body=self.i18n['appimage.install.imported.rename_error'].format(bold(pkg.local_file_path.split('/')[-1]),
bold(pkg.local_file_path.split('/')[-1]), bold(output)), bold(output)),
type_=MessageType.ERROR) type_=MessageType.ERROR)
return TransactionResult.fail() return TransactionResult.fail()