Fixed Show() to store a full UNIX path to the selected file

This commit is contained in:
sfraser%netscape.com 1998-12-15 03:11:59 +00:00
Родитель bfc23bd513
Коммит 6942e6d079
1 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -20,6 +20,8 @@
#include "nsStringUtil.h" #include "nsStringUtil.h"
#include <StandardFile.h> #include <StandardFile.h>
#include "nsFileSpec.h"
#define DBG 0 #define DBG 0
NS_IMPL_ADDREF(nsFileWidget) NS_IMPL_ADDREF(nsFileWidget)
@ -164,10 +166,17 @@ PRBool nsFileWidget::Show()
// Clean up filter buffers // Clean up filter buffers
delete filterBuffer; 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 // Set user-selected location of file or directory
Str255ToString(reply.sfFile.name,mFile); //Str255ToString(reply.sfFile.name, mFile);
return reply.sfGood; return PR_TRUE;
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------