diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index bc4864a578f..42e46dd75f4 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -161,9 +161,9 @@ void nsFileControlFrame::MouseClicked(nsIPresContext* aPresContext) result = fileWidget->Show(); if (result) { - nsString fileName; - fileWidget->GetFile(fileName); - mTextFrame->SetProperty(nsHTMLAtoms::value,fileName); + nsFileSpec fileSpec; + fileWidget->GetFile(fileSpec); + mTextFrame->SetProperty(nsHTMLAtoms::value,fileSpec.GetNativePathCString()); } NS_RELEASE(fileWidget); } diff --git a/layout/html/forms/src/nsFileControlFrame.cpp b/layout/html/forms/src/nsFileControlFrame.cpp index bc4864a578f..42e46dd75f4 100644 --- a/layout/html/forms/src/nsFileControlFrame.cpp +++ b/layout/html/forms/src/nsFileControlFrame.cpp @@ -161,9 +161,9 @@ void nsFileControlFrame::MouseClicked(nsIPresContext* aPresContext) result = fileWidget->Show(); if (result) { - nsString fileName; - fileWidget->GetFile(fileName); - mTextFrame->SetProperty(nsHTMLAtoms::value,fileName); + nsFileSpec fileSpec; + fileWidget->GetFile(fileSpec); + mTextFrame->SetProperty(nsHTMLAtoms::value,fileSpec.GetNativePathCString()); } NS_RELEASE(fileWidget); }