mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
fix for crash when trying to get the parent file when the file was a drive r=dougt bug 50837
This commit is contained in:
parent
7aa7ed7f6d
commit
364611d68d
@ -1525,7 +1525,7 @@ nsLocalFile::GetParent(nsIFile * *aParent)
|
||||
// cannot use nsCString::RFindChar() due to 0x5c problem
|
||||
PRInt32 offset = (PRInt32) (_mbsrchr((const unsigned char *) parentPath.GetBuffer(), '\\')
|
||||
- (const unsigned char *) parentPath.GetBuffer());
|
||||
if (offset == -1)
|
||||
if (offset < 0)
|
||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||
|
||||
parentPath.Truncate(offset);
|
||||
|
Loading…
Reference in New Issue
Block a user