Bug 280351 don't assert when a relative path is passed to

nsLocalFileUnix::InitWithPath
r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@169524 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2005-02-20 14:05:46 +00:00
parent be9d7b6082
commit bfcdafac58

View File

@@ -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;
}