From 1c2b36a081d9d826f593ae061ff6008533eb1e61 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Thu, 22 Jul 1999 09:35:55 +0000 Subject: [PATCH] Back out the code where, under Windows, try and munge imported IE Favorites names to not include a ".url". I'm going to put the code elsewhere. --- .../bookmarks/src/nsBookmarksService.cpp | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/xpfe/components/bookmarks/src/nsBookmarksService.cpp index f6f0958494a..99eca41f578 100644 --- a/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -1467,52 +1467,7 @@ nsBookmarksService::GetTarget(nsIRDFResource* aSource, } } - rv = mInner->GetTarget(aSource, aProperty, aTruthValue, aTarget); - -#ifdef XP_WIN - // under Windows, munge IE favorite names to strip off the ".url" - if (NS_SUCCEEDED(rv) && (aTruthValue) && (aProperty == kNC_Name)) - { - // XXX should ensure that aSource's URI begins with nsSpecialSystemDirectory::Win_Favorites - - nsCOMPtr tempNode = do_QueryInterface(*aTarget); - if (tempNode) - { - nsCOMPtr litTemp = do_QueryInterface(tempNode); - if (litTemp) - { - const PRUnichar *uniName = nsnull; - if (NS_SUCCEEDED(litTemp->GetValueConst(&uniName)) && (uniName)) - { - nsAutoString name(uniName), extension; - PRInt32 len = name.Length(); - if (len > 4) - { - name.Right(extension, 4); - if (extension.EqualsIgnoreCase(".url")) - { - name.Truncate(len-4); - - nsIRDFLiteral *literal; - if (NS_SUCCEEDED(gRDF->GetLiteral(name.GetUnicode(), - &literal))) - { - // be sure to release the original name we got back! - NS_IF_RELEASE(*aTarget); - - rv = literal->QueryInterface(nsIRDFNode::GetIID(), - (void**) aTarget); - NS_RELEASE(literal); - } - } - } - } - } - } - } -#endif - - return(rv); + return mInner->GetTarget(aSource, aProperty, aTruthValue, aTarget); }