Fix crash while loading config due to incorrect tw_storage_path
Change-Id: Ia5957efe616defa4272501cd8f31d26d394077bb Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
ee71706ad1
commit
93cb1ef2eb
@@ -1955,3 +1955,19 @@ void TWPartitionManager::Output_Storage_Fstab(void) {
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
TWPartition *TWPartitionManager::Get_Default_Storage_Partition()
|
||||
{
|
||||
TWPartition *res = NULL;
|
||||
for (std::vector<TWPartition*>::iterator iter = Partitions.begin(); iter != Partitions.end(); ++iter) {
|
||||
if(!(*iter)->Is_Storage)
|
||||
continue;
|
||||
|
||||
if((*iter)->Is_Settings_Storage)
|
||||
return *iter;
|
||||
|
||||
if(!res)
|
||||
res = *iter;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user