b=53596, r=dougt, sr=brendan
nsLocalFileUnix fix for ::GetLeafName not working on relative paths --pete git-svn-id: svn://10.0.0.236/trunk@107859 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -478,11 +478,8 @@ nsresult
|
||||
nsLocalFile::GetLeafNameRaw(const char **_retval)
|
||||
{
|
||||
CHECK_mPath();
|
||||
const char *leafName = strrchr((const char *)mPath, '/');
|
||||
NS_ASSERTION(leafName, "non-canonical mPath?");
|
||||
if (!leafName)
|
||||
return NS_ERROR_FILE_INVALID_PATH;
|
||||
*_retval = leafName+1;
|
||||
const char *leafName = strrchr(mPath.get(), '/');
|
||||
*_retval = leafName ? leafName + 1 : mPath.get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user