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 git-svn-id: svn://10.0.0.236/trunk@129027 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user