Need to call register_package_root prior to installing the package. The subsequent unregistering made me think that it was being registered at some point, but it was removed in the transition to eclair. The unregistration was dead code. It is being used now though.
This commit is contained in:
parent
6060e5c6df
commit
1f14c9a1f1
16
install.c
16
install.c
@ -243,12 +243,16 @@ handle_update_package(const char *path, ZipArchive *zip)
|
||||
ui_print("Installing update...\n");
|
||||
|
||||
int result = try_update_binary(path, zip);
|
||||
if (result == INSTALL_UPDATE_BINARY_MISSING)
|
||||
{
|
||||
const ZipEntry *script_entry;
|
||||
script_entry = find_update_script(zip);
|
||||
result = handle_update_script(zip, script_entry);
|
||||
}
|
||||
if (result == INSTALL_UPDATE_BINARY_MISSING)
|
||||
{
|
||||
if (register_package_root(zip, path) < 0) {
|
||||
LOGE("Can't register package root\n");
|
||||
return INSTALL_ERROR;
|
||||
}
|
||||
const ZipEntry *script_entry;
|
||||
script_entry = find_update_script(zip);
|
||||
result = handle_update_script(zip, script_entry);
|
||||
}
|
||||
register_package_root(NULL, NULL); // Unregister package root
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user