From 9a561dd2b36fb0576047648165bca59ac7894d73 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Mon, 22 Feb 2016 21:25:51 -0600 Subject: partitions: Fix path based Find_Next_Storage If a path is specified for Find_Next_Storage() and datamedia is excluded, the function currently runs to the end of available partitions and reports no other storage is available. Fix this by restoring the original mount_point == search_path check to break the loop. The subsequent partitions loop will skip data-media storage as needed. Change-Id: I92baed866cd36f13d851bd58ba5346e47edb142e --- partitionmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index cc090cf4b..e244aac79 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1516,7 +1516,7 @@ TWPartition* TWPartitionManager::Find_Next_Storage(string Path, bool Exclude_Dat if (!Path.empty()) { string Search_Path = TWFunc::Get_Root_Path(Path); for (; iter != Partitions.end(); iter++) { - if (Exclude_Data_Media && (*iter)->Has_Data_Media) { + if ((*iter)->Mount_Point == Search_Path) { iter++; break; } -- cgit v1.2.3