Skip to content
Snippets Groups Projects
Commit 9e5f1db3 authored by jefft%netscape.com's avatar jefft%netscape.com
Browse files

Part of fixing bug 5781 -- nsImapURI2Path failed to generate local path for...

Part of fixing bug 5781 -- nsImapURI2Path failed to generate local path for folders within another folder
parent 354115f5
No related branches found
No related tags found
No related merge requests found
......@@ -121,8 +121,24 @@ nsImapURI2Path(const char* rootURI, const char* uriStr, nsFileSpec& pathResult)
return rv;
}
if (folder != "")
pathResult += folder;
if (folder != "")
{
nsAutoString parentName = folder;
nsAutoString leafName = folder;
PRInt32 dirEnd = parentName.Find('/');
while(dirEnd > 0)
{
parentName.Right(leafName, parentName.Length() - dirEnd -1);
parentName.Truncate(dirEnd);
parentName += sbdSep;
pathResult += parentName;
parentName = leafName;
dirEnd = parentName.Find('/');
}
if (leafName != "")
pathResult += leafName;
}
return NS_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment