mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Updater: Fix resources.tgz confusion
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
- Services:
|
||||
- Big cleanup of all services and settings handling, refactor lots old code (by @Willy-JL)
|
||||
- Update all settings paths to use equivalents like OFW or UL for better compatibility (by @Willy-JL)
|
||||
- Updater: Change to `resources.tar.gz` filename to avoid confusion with update `.tgz` (by @Willy-JL)
|
||||
- OFW: NFC: Refactor detected protocols list (by @Astrrra)
|
||||
- Furi:
|
||||
- OFW: FuriEventLoop Pt.2 with `Mutex` `Semaphore` `StreamBuffer`, refactor Power service (by @gsurkov)
|
||||
|
||||
@@ -19,15 +19,18 @@ TarOpenMode tar_archive_get_mode_for_path(const char* path) {
|
||||
|
||||
FuriString* path_str = furi_string_alloc_set_str(path);
|
||||
path_extract_extension(path_str, ext, sizeof(ext));
|
||||
furi_string_free(path_str);
|
||||
TarOpenMode open_mode;
|
||||
|
||||
if(strcmp(ext, ".ths") == 0) {
|
||||
return TarOpenModeReadHeatshrink;
|
||||
} else if(strcmp(ext, ".tgz") == 0) {
|
||||
return TarOpenModeReadGzip;
|
||||
open_mode = TarOpenModeReadHeatshrink;
|
||||
} else if(strcmp(ext, ".tgz") == 0 || furi_string_end_with(path_str, ".tar.gz")) {
|
||||
open_mode = TarOpenModeReadGzip;
|
||||
} else {
|
||||
return TarOpenModeRead;
|
||||
open_mode = TarOpenModeRead;
|
||||
}
|
||||
|
||||
furi_string_free(path_str);
|
||||
return open_mode;
|
||||
}
|
||||
|
||||
typedef struct TarArchive {
|
||||
|
||||
@@ -9,7 +9,7 @@ from .heatshrink_stream import HeatshrinkDataStreamHeader
|
||||
FLIPPER_TAR_FORMAT = tarfile.USTAR_FORMAT
|
||||
|
||||
TAR_HEATSHRINK_EXTENSION = ".ths"
|
||||
TAR_GZIP_EXTENSION = ".tgz"
|
||||
TAR_GZIP_EXTENSION = ".tar.gz"
|
||||
|
||||
|
||||
def tar_sanitizer_filter(tarinfo: tarfile.TarInfo):
|
||||
|
||||
Reference in New Issue
Block a user