ksud: Fix weird module.prop. close #1191

This commit is contained in:
weishu
2023-12-15 18:27:48 +08:00
parent 79341ab501
commit a1153683e1
2 changed files with 3 additions and 2 deletions

View File

@@ -27,11 +27,11 @@ grep_cmdline() {
}
grep_prop() {
local REGEX="s/^$1=//p"
local REGEX="s/$1=//p"
shift
local FILES=$@
[ -z "$FILES" ] && FILES='/system/build.prop'
cat $FILES 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1
cat $FILES 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1 | xargs
}
grep_get_prop() {

View File

@@ -354,6 +354,7 @@ fn _install_module(zip: &str) -> Result<()> {
let Some(module_id) = module_prop.get("id") else {
bail!("module id not found in module.prop!");
};
let module_id = module_id.trim();
let modules_img = Path::new(defs::MODULE_IMG);
let modules_update_img = Path::new(defs::MODULE_UPDATE_IMG);