Use account-based rather than protocol-based cache paths
This commit is contained in:
parent
5723f55433
commit
7767995400
|
@ -126,20 +126,14 @@ CayaCachePath()
|
||||||
|
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
CayaLogPath(const char* signature, const char* subsignature)
|
CayaLogPath(const char* accountName)
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
|
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
path.Append("Caya/Logs");
|
path.Append("Caya/Logs");
|
||||||
path.Append(signature);
|
path.Append(accountName);
|
||||||
|
|
||||||
if (BString(signature) != BString(subsignature)
|
|
||||||
|| BString(subsignature).IsEmpty() == false)
|
|
||||||
{
|
|
||||||
path.Append(subsignature);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (create_directory(path.Path(), 0755) != B_OK)
|
if (create_directory(path.Path(), 0755) != B_OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -22,7 +22,7 @@ const char* CayaAccountPath(const char* signature);
|
||||||
const char* CayaAccountPath(const char* signature, const char* subsignature);
|
const char* CayaAccountPath(const char* signature, const char* subsignature);
|
||||||
|
|
||||||
const char* CayaCachePath();
|
const char* CayaCachePath();
|
||||||
const char* CayaLogPath(const char* signature, const char* subsignature);
|
const char* CayaLogPath(const char* accountName);
|
||||||
|
|
||||||
rgb_color CayaTintColor(rgb_color color, int severity);
|
rgb_color CayaTintColor(rgb_color color, int severity);
|
||||||
rgb_color CayaForegroundColor(rgb_color background);
|
rgb_color CayaForegroundColor(rgb_color background);
|
||||||
|
|
|
@ -360,10 +360,7 @@ Conversation::_EnsureLogPath()
|
||||||
if (fLogPath.InitCheck() == B_OK)
|
if (fLogPath.InitCheck() == B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const char* sig = fLooper->Protocol()->Signature();
|
fLogPath.SetTo(CayaLogPath(fLooper->Protocol()->GetName()));
|
||||||
CayaProtocolAddOn* protoAdd = ProtocolManager::Get()->ProtocolAddOn(sig);
|
|
||||||
|
|
||||||
fLogPath.SetTo(CayaLogPath(protoAdd->Signature(), protoAdd->ProtoSignature()));
|
|
||||||
fLogPath.Append(fID);
|
fLogPath.Append(fID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -808,7 +808,7 @@ JabberHandler::_SetupAvatarCache()
|
||||||
|
|
||||||
path.Append("Caya");
|
path.Append("Caya");
|
||||||
path.Append("Cache");
|
path.Append("Cache");
|
||||||
path.Append(Signature());
|
path.Append(GetName());
|
||||||
|
|
||||||
if (create_directory(path.Path(), 0755) != B_OK)
|
if (create_directory(path.Path(), 0755) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
Ŝarĝante…
Reference in New Issue