Merge "Use metadata_key_dir instead of metadata_encryption" am: 389e5c114d am: 4e6e027086

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1908137

Change-Id: I39ea589e0ac3df2f3fd2ad02b11877f439438a06
diff --git a/recovery_utils/roots.cpp b/recovery_utils/roots.cpp
index d761e75..7fe385b 100644
--- a/recovery_utils/roots.cpp
+++ b/recovery_utils/roots.cpp
@@ -182,7 +182,7 @@
   // to get any failure in the process. In order to avoid it, let's simply wipe
   // the raw disk if we don't reserve any space, which behaves exactly same as booting
   // after "fastboot -w".
-  if (!v->metadata_encryption.empty() && length == 0) {
+  if (!v->metadata_key_dir.empty() && length == 0) {
     android::base::unique_fd fd(open(v->blk_device.c_str(), O_RDWR));
     if (fd == -1) {
       PLOG(ERROR) << "format_volume: failed to open " << v->blk_device;