зеркало из https://github.com/mozilla/pjs.git
fix handling of online sub directories with imap namespaces, r/sr=mscott 219645
This commit is contained in:
Родитель
43ea4c1d7a
Коммит
e12d893b2d
|
@ -861,6 +861,10 @@ NS_IMETHODIMP nsImapUrl::AddOnlineDirectoryIfNecessary(const char *onlineMailbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ns && (PL_strlen(ns->GetPrefix()) != 0) && !onlineDirWithDelimiter.Equals(ns->GetPrefix()))
|
if (ns && (PL_strlen(ns->GetPrefix()) != 0) && !onlineDirWithDelimiter.Equals(ns->GetPrefix()))
|
||||||
|
{
|
||||||
|
// check that onlineMailboxName doesn't start with the namespace. If that's the case,
|
||||||
|
// we don't want to prepend the online dir.
|
||||||
|
if (PL_strncmp(onlineMailboxName, ns->GetPrefix(), PL_strlen(ns->GetPrefix())))
|
||||||
{
|
{
|
||||||
// The namespace for this mailbox is the root ("").
|
// The namespace for this mailbox is the root ("").
|
||||||
// Prepend the online server directory
|
// Prepend the online server directory
|
||||||
|
@ -873,6 +877,7 @@ NS_IMETHODIMP nsImapUrl::AddOnlineDirectoryIfNecessary(const char *onlineMailbox
|
||||||
PL_strcat(newOnlineName, onlineMailboxName);
|
PL_strcat(newOnlineName, onlineMailboxName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// just prepend the online server directory if it doesn't start with it already
|
// just prepend the online server directory if it doesn't start with it already
|
||||||
else if (strncmp(onlineMailboxName, onlineDirWithDelimiter.get(), onlineDirWithDelimiter.Length()))
|
else if (strncmp(onlineMailboxName, onlineDirWithDelimiter.get(), onlineDirWithDelimiter.Length()))
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче