зеркало из https://github.com/mozilla/pjs.git
b=121489, r=dougt, sr=bzbarsky
Simple fix for nsIFile GetParent to return null when already at the top of the volume Thanks guys for the speedy review. --pete
This commit is contained in:
Родитель
7250aa6490
Коммит
6eba4ecdec
|
@ -1164,6 +1164,10 @@ nsLocalFile::GetParent(nsIFile **aParent)
|
|||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
*aParent = nsnull;
|
||||
|
||||
// if '/' we are at the top of the volume, return null
|
||||
if (mPath.Equals("/"))
|
||||
return NS_OK;
|
||||
|
||||
// <brendan, after jband> I promise to play nice
|
||||
char *buffer = NS_CONST_CAST(char *, mPath.get()),
|
||||
*slashp = buffer;
|
||||
|
|
Загрузка…
Ссылка в новой задаче