Jacek Caban : mshtml: Reimplement nsIURL::GetFileBaseName on top of IUri.

Alexandre Julliard julliard at winehq.org
Wed Jan 11 13:40:00 CST 2012


Module: wine
Branch: master
Commit: fc899dfa995bce1deb5de783d18c9d737572c546
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fc899dfa995bce1deb5de783d18c9d737572c546

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jan 11 19:41:28 2012 +0100

mshtml: Reimplement nsIURL::GetFileBaseName on top of IUri.

---

 dlls/mshtml/nsio.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 09ee17b..4ef2752 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -2662,14 +2662,19 @@ static nsresult NSAPI nsURL_SetFileName(nsIURL *iface, const nsACString *aFileNa
 static nsresult NSAPI nsURL_GetFileBaseName(nsIURL *iface, nsACString *aFileBaseName)
 {
     nsWineURI *This = impl_from_nsIURL(iface);
+    const WCHAR *file, *ext;
+    BSTR path;
+    nsresult nsres;
 
     TRACE("(%p)->(%p)\n", This, aFileBaseName);
 
-    if(This->nsurl)
-        return nsIURL_GetFileBaseName(This->nsurl, aFileBaseName);
+    nsres = get_uri_path(This, &path, &file, &ext);
+    if(NS_FAILED(nsres))
+        return nsres;
 
-    FIXME("default action not implemented\n");
-    return NS_ERROR_NOT_IMPLEMENTED;
+    nsres = return_wstr_nsacstr(aFileBaseName, file, ext-file);
+    SysFreeString(path);
+    return nsres;
 }
 
 static nsresult NSAPI nsURL_SetFileBaseName(nsIURL *iface, const nsACString *aFileBaseName)




More information about the wine-cvs mailing list