From 6942e6d079889530747a151313c94db74e6c5e69 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Tue, 15 Dec 1998 03:11:59 +0000 Subject: [PATCH] Fixed Show() to store a full UNIX path to the selected file --- widget/src/mac/nsFileWidget.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/widget/src/mac/nsFileWidget.cpp b/widget/src/mac/nsFileWidget.cpp index 7266dd90a05..0f3e05d0332 100644 --- a/widget/src/mac/nsFileWidget.cpp +++ b/widget/src/mac/nsFileWidget.cpp @@ -20,6 +20,8 @@ #include "nsStringUtil.h" #include +#include "nsFileSpec.h" + #define DBG 0 NS_IMPL_ADDREF(nsFileWidget) @@ -164,10 +166,17 @@ PRBool nsFileWidget::Show() // Clean up filter buffers delete filterBuffer; + if (!reply.sfGood) return PR_FALSE; + + nsNativeFileSpec fileSpec(reply.sfFile); + nsFilePath filePath(fileSpec); + + mFile = filePath; + // Set user-selected location of file or directory - Str255ToString(reply.sfFile.name,mFile); + //Str255ToString(reply.sfFile.name, mFile); - return reply.sfGood; + return PR_TRUE; } //-------------------------------------------------------------------------