Failure to create/find the art-cache directory should be fatal.
Otherwise -- experience now shows -- we carry on for a surprisingly long
time and crash somewhere non-obvious.
Change-Id: Idf8298a9948c3038484247f481f6673207e1df0f
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 46fb2dc..10ffab3 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -237,11 +237,11 @@
if (StringPiece(art_cache).starts_with("/tmp/")) {
int result = mkdir(art_cache.c_str(), 0700);
if (result != 0) {
- LOG(ERROR) << "Failed to create art-cache directory " << art_cache;
+ LOG(FATAL) << "Failed to create art-cache directory " << art_cache;
return NULL;
}
} else {
- LOG(ERROR) << "Failed to find art-cache directory " << art_cache;
+ LOG(FATAL) << "Failed to find art-cache directory " << art_cache;
return NULL;
}
}