Bug 280351 don't assert when a relative path is passed to
nsLocalFileUnix::InitWithPath r=dougt sr=darin
This commit is contained in:
@@ -284,10 +284,9 @@ nsLocalFile::InitWithNativePath(const nsACString &filePath)
|
||||
}
|
||||
|
||||
mPath = homePath + Substring(filePath, 1, filePath.Length() - 1);
|
||||
} else if (filePath.IsEmpty() || filePath.First() != '/') {
|
||||
NS_ERROR("Relative paths not allowed");
|
||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||
} else {
|
||||
if (filePath.IsEmpty() || filePath.First() != '/') {
|
||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||
mPath = filePath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user