GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.
This commit is contained in:
Ingo Weinhold
2011-11-25 06:19:39 +01:00
parent ad4fba78b2
commit 84f50b1ce9
+2 -2
View File
@@ -139,7 +139,7 @@ BPackageRoster::GetRepositoryCache(const BString& name,
if (repoCacheEntry.Exists())
return repositoryCache->SetTo(repoCacheEntry);
if ((result = GetCommonRepositoryCachePath(&path)) != B_OK)
if ((result = GetCommonRepositoryCachePath(&path, true)) != B_OK)
return result;
path.Append(name.String());
@@ -166,7 +166,7 @@ BPackageRoster::GetRepositoryConfig(const BString& name,
if (repoConfigEntry.Exists())
return repositoryConfig->SetTo(repoConfigEntry);
if ((result = GetCommonRepositoryConfigPath(&path)) != B_OK)
if ((result = GetCommonRepositoryConfigPath(&path, true)) != B_OK)
return result;
path.Append(name.String());