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

nsLocalFileUnix::InitWithPath
r=dougt sr=darin
This commit is contained in:
cbiesinger@web.de
2005-02-20 14:05:46 +00:00
parent c6d14dc678
commit 3e77eea23c

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