зеркало из https://github.com/mozilla/pjs.git
Fixed Show() to store a full UNIX path to the selected file
This commit is contained in:
Родитель
bfc23bd513
Коммит
6942e6d079
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
Загрузка…
Ссылка в новой задаче