From fc899dfa995bce1deb5de783d18c9d737572c546 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 11 Jan 2012 19:41:28 +0100 Subject: [PATCH] mshtml: Reimplement nsIURL::GetFileBaseName on top of IUri. --- dlls/mshtml/nsio.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 09ee17b1856..4ef2752ee7a 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)