pull/1991/head
jLynx 9 months ago
parent 552c7b86c1
commit 0be9dbb2e6

@ -758,23 +758,18 @@ impl Update {
))] ))]
impl Update { impl Update {
fn install_inner(&self, bytes: &[u8]) -> Result<()> { fn install_inner(&self, bytes: &[u8]) -> Result<()> {
log::warn!("=========== UPDATE ==================");
log::debug!("Starting Linux update installation"); log::debug!("Starting Linux update installation");
log::debug!("Extract path: {:?}", self.extract_path); log::debug!("Extract path: {:?}", self.extract_path);
// Check if it's a tar.gz archive
if infer::archive::is_gz(bytes) {
log::debug!("Detected tar.gz archive, attempting to extract");
return self.handle_targz(bytes);
}
// If not a tar.gz, try direct installation
log::debug!("Not a tar.gz archive, attempting direct installation");
if self.is_deb_package() { if self.is_deb_package() {
self.install_deb_update(bytes) self.install_deb_update(bytes)
} else { } else {
// Handle AppImage or other formats
self.install_appimage_update(bytes) self.install_appimage_update(bytes)
} }
} }
// Separate the AppImage logic into its own function // Separate the AppImage logic into its own function
fn install_appimage_update(&self, bytes: &[u8]) -> Result<()> { fn install_appimage_update(&self, bytes: &[u8]) -> Result<()> {

Loading…
Cancel
Save