#3930 "file selection control displays complete path"

This commit is contained in:
pierre@netscape.com
1999-05-28 00:40:18 +00:00
parent bee7458fc5
commit 595a47c3b5
2 changed files with 10 additions and 2 deletions

View File

@@ -163,7 +163,11 @@ void nsFileControlFrame::MouseClicked(nsIPresContext* aPresContext)
if (result) {
nsFileSpec fileSpec;
fileWidget->GetFile(fileSpec);
mTextFrame->SetProperty(nsHTMLAtoms::value,fileSpec.GetNativePathCString());
char* leafName = fileSpec.GetLeafName();
if (leafName) {
mTextFrame->SetProperty(nsHTMLAtoms::value,leafName);
nsCRT::free(leafName);
}
}
NS_RELEASE(fileWidget);
}