Fix spurious error

Bug: 79542247
Test: error no longer appears
Change-Id: I2cf91c8cd937b81041a47e4b64a882445a80eb0b
This commit is contained in:
Paul Crowley 2018-05-09 13:01:16 -07:00
parent 8f82879901
commit 98a23a19d1

View file

@ -79,9 +79,10 @@ static bool read_key(struct fstab_rec const* data_rec, bool create_if_absent, Ke
}
std::string key_dir = data_rec->key_dir;
auto dir = key_dir + "/key";
LOG(DEBUG) << "key_dir/key: " << key;
if (!fs_mkdirs(dir.c_str(), 0700)) {
LOG(DEBUG) << "key_dir/key: " << dir;
if (fs_mkdirs(dir.c_str(), 0700)) {
PLOG(ERROR) << "Creating directories: " << dir;
return false;
}
auto temp = key_dir + "/tmp";
if (!android::vold::retrieveKey(create_if_absent, dir, temp, key)) return false;