apex: cleanup apex directory bind mount names
Change-Id: Ia120ed12f3ae551044907dfd1fd05444be78d18c
This commit is contained in:
+4
-1
@@ -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) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
Reference in New Issue
Block a user