#3930 "file selection control displays complete path"

git-svn-id: svn://10.0.0.236/trunk@33060 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pierre%netscape.com
1999-05-28 00:40:18 +00:00
parent 2f9ac3f4fe
commit 75ff1ae0ae
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);
}