Skip to content

Commit 3d7d673

Browse files
authored
Respect mutable cache open error. (#1216)
Result of opening protected cache rewrites result of openning mutable cache. We will miss errors protected cache is ok. Relates-To: OAM-1088 Signed-off-by: Kostiantyn Zvieriev <[email protected]>
1 parent 54d6570 commit 3d7d673

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

olp-cpp-sdk-core/src/cache/DefaultCacheImpl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,10 @@ DefaultCache::StorageOpenResult DefaultCacheImpl::SetupStorage() {
812812
result = SetupMutableCache();
813813
}
814814

815+
if (result != StorageOpenResult::Success) {
816+
return result;
817+
}
818+
815819
if (settings_.disk_path_protected) {
816820
result = SetupProtectedCache();
817821
}

0 commit comments

Comments
 (0)