summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 1c59de7f0..cc090cf4b 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2413,3 +2413,16 @@ void TWPartitionManager::Decrypt_Adopted() {
return;
#endif
}
+
+void TWPartitionManager::Remove_Partition_By_Path(string Path) {
+ std::vector<TWPartition*>::iterator iter;
+ string Local_Path = TWFunc::Get_Root_Path(Path);
+
+ for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
+ if ((*iter)->Mount_Point == Local_Path || (!(*iter)->Symlink_Mount_Point.empty() && (*iter)->Symlink_Mount_Point == Local_Path)) {
+ LOGINFO("Found and erasing '%s' from partition list\n", Local_Path.c_str());
+ Partitions.erase(iter);
+ return;
+ }
+ }
+}