diff options
Diffstat (limited to 'roots.cpp')
-rw-r--r-- | roots.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -348,7 +348,7 @@ static int rmtree_except(const char* path, const char* except) return rc; } -int format_volume(const char* volume) { +int format_volume(const char* volume, bool force) { if (strcmp(volume, "media") == 0) { if (!vdc->isEmulatedStorage()) { return 0; @@ -378,7 +378,7 @@ int format_volume(const char* volume) { return -1; } - if (strcmp(volume, "/data") == 0 && vdc->isEmulatedStorage()) { + if (!force && strcmp(volume, "/data") == 0 && vdc->isEmulatedStorage()) { if (ensure_path_mounted("/data") == 0) { // Preserve .layout_version to avoid "nesting bug" LOGI("Preserving layout version\n"); |