mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Fixes for minitar related to app install (#420)
This commit is contained in:
parent
6ab6ae5686
commit
fec8033fd7
@ -1 +1 @@
|
|||||||
Subproject commit 23329dbf4c8237375343472952beb76f62693dda
|
Subproject commit 274f9566e51b81117036dc95155f943084086f53
|
||||||
@ -25,7 +25,7 @@ constexpr auto* TAG = "App";
|
|||||||
|
|
||||||
namespace tt::app {
|
namespace tt::app {
|
||||||
|
|
||||||
static bool untarFile(minitar mp, const minitar_entry* entry, const std::string& destinationPath) {
|
static bool untarFile(minitar* mp, const minitar_entry* entry, const std::string& destinationPath) {
|
||||||
const auto absolute_path = destinationPath + "/" + entry->metadata.path;
|
const auto absolute_path = destinationPath + "/" + entry->metadata.path;
|
||||||
if (!file::findOrCreateDirectory(destinationPath, 0777)) {
|
if (!file::findOrCreateDirectory(destinationPath, 0777)) {
|
||||||
TT_LOG_E(TAG, "Can't find or create directory %s", destinationPath.c_str());
|
TT_LOG_E(TAG, "Can't find or create directory %s", destinationPath.c_str());
|
||||||
@ -33,7 +33,7 @@ static bool untarFile(minitar mp, const minitar_entry* entry, const std::string&
|
|||||||
}
|
}
|
||||||
|
|
||||||
// minitar_read_contents(&mp, &entry, file_buffer, entry.metadata.size);
|
// minitar_read_contents(&mp, &entry, file_buffer, entry.metadata.size);
|
||||||
if (minitar_read_contents_to_file(&mp, entry, absolute_path.c_str()) <= 0) {
|
if (!minitar_read_contents_to_file(mp, entry, absolute_path.c_str())) {
|
||||||
TT_LOG_E(TAG, "Failed to write data to %s", absolute_path.c_str());
|
TT_LOG_E(TAG, "Failed to write data to %s", absolute_path.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ static bool untar(const std::string& tarPath, const std::string& destinationPath
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (entry.metadata.type == MTAR_REGULAR) {
|
} else if (entry.metadata.type == MTAR_REGULAR) {
|
||||||
if (!untarFile(mp, &entry, destinationPath)) {
|
if (!untarFile(&mp, &entry, destinationPath)) {
|
||||||
TT_LOG_E(TAG, "Failed to extract file %s: %s", entry.metadata.path, strerror(errno));
|
TT_LOG_E(TAG, "Failed to extract file %s: %s", entry.metadata.path, strerror(errno));
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user