Github user PepperJo commented on a diff in the pull request:
https://github.com/apache/incubator-crail/pull/25#discussion_r196679099
--- Diff:
client/src/main/java/org/apache/crail/memory/MappedBufferCache.java ---
@@ -54,7 +54,9 @@ public MappedBufferCache() throws IOException {
directory = CrailUtils.getCacheDirectory(id);
dir = new File(directory);
if (!dir.exists()){
- dir.mkdirs();
+ if (!dir.mkdirs()) {
+ throw new IOException("Cannot create
cache directory [crail.cachepath] set to path " + directory + ", check if
crail.cachepath exists and has write permissions");
+ }
}
for (File child : dir.listFiles()) {
child.delete();
--- End diff --
What if the dir exists but we don't have permission to delete the childs?
Resp. create new ones?
---