apex: cleanup apex directory bind mount names

Change-Id: Ia120ed12f3ae551044907dfd1fd05444be78d18c
This commit is contained in:
bigbiff
2021-10-17 20:02:17 -04:00
parent b9655640f7
commit b5a20a8d00
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -169,7 +169,10 @@ bool twrpApex::loadApexImage(std::string fileToMount, size_t loop_device_number)
close(loop_fd);
std::string bind_mount(APEX_BASE);
bind_mount = bind_mount + basename(fileToMount.c_str());
std::string apex_cleaned_mount = fileToMount;
apex_cleaned_mount = std::regex_replace(apex_cleaned_mount, std::regex("\\.apex"), "");
bind_mount = bind_mount + basename(apex_cleaned_mount.c_str());
int ret = mkdir(bind_mount.c_str(), 0666);
if (ret != 0) {
+1
View File
@@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <filesystem>
#include <regex>
#include <sstream>
#include <sys/types.h>