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

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


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

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

mshtml: Reimplement nsIURL::GetFileName 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 1c69a64..09ee17b 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -2626,14 +2626,19 @@ static nsresult NSAPI nsURL_SetDirectory(nsIURL *iface, const nsACString *aDirec
 static nsresult NSAPI nsURL_GetFileName(nsIURL *iface, nsACString *aFileName)
 {
     nsWineURI *This = impl_from_nsIURL(iface);
+    const WCHAR *file;
+    BSTR path;
+    nsresult nsres;
 
     TRACE("(%p)->(%p)\n", This, aFileName);
 
-    if(This->nsurl)
-        return nsIURL_GetFileName(This->nsurl, aFileName);
+    nsres = get_uri_path(This, &path, &file, NULL);
+    if(NS_FAILED(nsres))
+        return nsres;
 
-    FIXME("default action not implemented\n");
-    return NS_ERROR_NOT_IMPLEMENTED;
+    nsres = return_wstr_nsacstr(aFileName, file, -1);
+    SysFreeString(path);
+    return nsres;
 }
 
 static nsresult NSAPI nsURL_SetFileName(nsIURL *iface, const nsACString *aFileName)




More information about the wine-cvs mailing list