зеркало из https://github.com/mozilla/gecko-dev.git
create the necessary news related directories, if they don't exist
This commit is contained in:
Родитель
647043469e
Коммит
10872772e1
|
@ -134,14 +134,26 @@ nsNewsURI2Path(const char* rootURI, const char* uriStr, nsFileSpec& pathResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
// create pathResult if it doesn't exist
|
||||
// at this point, pathResult should be something like
|
||||
// .../News, ...\News, ...:News)
|
||||
if (!pathResult.Exists())
|
||||
pathResult.CreateDir();
|
||||
|
||||
nsAutoString alteredHost = "host-";
|
||||
alteredHost += hostname;
|
||||
|
||||
|
||||
// can't do pathResult += "host-"; pathresult += hostname;
|
||||
// because += on a nsFileSpec inserts a separator
|
||||
// so we'd end up with host-/hostname and not host-hostname
|
||||
pathResult += alteredHost;
|
||||
|
||||
// create pathResult if it doesn't exist
|
||||
// at this point, pathResult should be something like
|
||||
// ../News/host-<hostname>, ...\News\host-<hostname>, ...:News:host-<hostname>
|
||||
if (!pathResult.Exists())
|
||||
pathResult.CreateDir();
|
||||
|
||||
if (newsgroup != "") {
|
||||
pathResult += newsgroup;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче