mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
oops - I wasn't properly checking for presence of firmware files
This commit is contained in:
parent
0006858469
commit
7bd6615cb7
1 changed files with 5 additions and 3 deletions
|
|
@ -230,10 +230,12 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
|||
val (region) = regionRegex.find(hwVer)?.destructured
|
||||
?: throw Exception("Malformed hw version")
|
||||
|
||||
val name = "firmware/firmware-$mfg-$region-$curver.bin"
|
||||
val base = "firmware-$mfg-$region-$curver.bin"
|
||||
|
||||
// Check to see if the file exists (some builds might not include update files for size reasons)
|
||||
return if (!context.assets.list(name).isNullOrEmpty())
|
||||
name
|
||||
val firmwareFiles = context.assets.list("firmware") ?: arrayOf()
|
||||
return if (firmwareFiles.contains(base))
|
||||
"firmware/$base"
|
||||
else
|
||||
null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue