action: Only unmount /vendor if it actually exists
* Since commit 168bc4caaedfdf655a71ba24a1c5a7f2b905a122 the vendor partition gets unmounted prior to switching the slots. However, devices without a vendor partition (e.g. tissot's stock partition table) will have errors since the partition doesn't actually exist
* Therefore, it should be only mounted if that partition exists in the partition table
Change-Id: Id16ab55e25d05964ca0de1bf218914d66c2b0205
diff --git a/gui/action.cpp b/gui/action.cpp
index 37534fa..b51e8aa 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1983,7 +1983,8 @@
{
operation_start("Set Boot Slot");
if (!simulate) {
- PartitionManager.UnMount_By_Path("/vendor",true);
+ if (PartitionManager.Find_Partition_By_Path("/vendor"))
+ PartitionManager.UnMount_By_Path("/vendor",true);
PartitionManager.Set_Active_Slot(arg);
} else
simulate_progress_bar();