зеркало из https://github.com/mozilla/pjs.git
Adding critical check for null.
removing unneded assignment to temp var.
This commit is contained in:
Родитель
2bac8b3ccc
Коммит
b2d97a1c4d
|
@ -116,6 +116,8 @@ nsInstallFolder::nsInstallFolder(const nsString& aFolderID, const nsString& aRel
|
|||
// if it already exists...
|
||||
nsCOMPtr<nsILocalFile> dirCheck;
|
||||
NS_NewLocalFile(aFolderID.ToNewCString(), getter_AddRefs(dirCheck));
|
||||
if (dirCheck)
|
||||
{
|
||||
dirCheck->IsDirectory(&flagIsDir);
|
||||
dirCheck->Exists(&flagExists);
|
||||
if ( flagIsDir || !flagExists )
|
||||
|
@ -139,7 +141,7 @@ nsInstallFolder::nsInstallFolder(const nsString& aFolderID, const nsString& aRel
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nsInstallFolder::nsInstallFolder(nsInstallFolder& inFolder, const nsString& subString)
|
||||
{
|
||||
|
@ -291,17 +293,7 @@ nsInstallFolder::SetDirectoryPath(const nsString& aFolderID, const nsString& aRe
|
|||
|
||||
case 109: /////////////////////////////////////////////////////////// File URL
|
||||
{
|
||||
if (aRelativePath.IsEmpty())
|
||||
{
|
||||
mFileSpec = nsnull;
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsILocalFile> temp;
|
||||
|
||||
nsString tempFileURLString = aFolderID;
|
||||
tempFileURLString += aRelativePath;
|
||||
|
||||
NS_NewLocalFile(aRelativePath.ToNewCString(), getter_AddRefs(temp));
|
||||
mFileSpec = temp;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче