Updater: Fix resources.tgz confusion

This commit is contained in:
Willy-JL
2024-08-15 03:23:28 +02:00
parent a514447f1c
commit c5f18fadb8
3 changed files with 10 additions and 6 deletions

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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):