summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index fee08577c..b717aef72 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -1541,7 +1541,7 @@ static bool should_flash_in_userspace(const std::string& partition_name) {
return false;
}
auto path = find_item_given_name("super_empty.img");
- if (path.empty()) {
+ if (path.empty() || access(path.c_str(), R_OK)) {
return false;
}
auto metadata = android::fs_mgr::ReadFromImageFile(path);