Remove appfuse mount point directory after unmounting.
Bug: 34691785
Test: Check if there are directories under /mnt/appfuse after
unmounting.
Change-Id: I00a897dd6d60e20b5ccfdfe2faeabb8a4f489197
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 36249e7..e80bdce 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -756,6 +756,10 @@
PLOG(ERROR) << "Failed to unmount directory.";
_exit(-errno);
}
+ if (rmdir(path.c_str()) != 0) {
+ PLOG(ERROR) << "Failed to remove the mount directory.";
+ _exit(-errno);
+ }
_exit(android::OK);
} else {
LOG(ERROR) << "Unknown appfuse command " << command;