From bfcdafac583075c6288d0e99302435717c36445a Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Sun, 20 Feb 2005 14:05:46 +0000 Subject: [PATCH] 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 --- mozilla/xpcom/io/nsLocalFileUnix.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 6111e06acdf..33dcf3c531e 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -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; }