зеркало из https://github.com/mozilla/pjs.git
win9x part of the fix for bug #172001
multiple file open can fail for multiple files. it will still fail, but now it will take a lot more, since we're using a bigger buffer. an example: multiple file attach to the compose window. r/sr/a=sspitzer
This commit is contained in:
Родитель
891e05f8b0
Коммит
2a81605580
|
@ -82,14 +82,6 @@ nsFilePicker::~nsFilePicker()
|
|||
NS_IF_RELEASE(mUnicodeDecoder);
|
||||
}
|
||||
|
||||
// we used to use MAX_PATH
|
||||
// which works great for one file
|
||||
// but for multiple files, the format is
|
||||
// dirpath\0\file1\0file2\0...filen\0\0
|
||||
// and that can quickly be more than MAX_PATH (260)
|
||||
// see bug #172001 for more details
|
||||
#define FILE_BUFFER_SIZE 4096
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Show - Display the file dialog
|
||||
|
|
|
@ -220,7 +220,7 @@ BOOL CallOpenSaveFileNameA(LPOPENFILENAMEW aFileNameW, BOOL aOpen)
|
|||
OPENFILENAMEA ofnA;
|
||||
char filterA[MAX_FILTER_NAME+2];
|
||||
char customFilterA[MAX_FILTER_NAME+1];
|
||||
char fileA[MAX_PATH+1];
|
||||
char fileA[FILE_BUFFER_SIZE+1];
|
||||
char fileTitleA[MAX_PATH+1];
|
||||
char initDirA[MAX_PATH+1];
|
||||
char titleA[MAX_PATH+1];
|
||||
|
@ -256,9 +256,9 @@ BOOL CallOpenSaveFileNameA(LPOPENFILENAMEW aFileNameW, BOOL aOpen)
|
|||
}
|
||||
ofnA.nFilterIndex = aFileNameW->nFilterIndex; // Index of pair of filter strings. Should be ok.
|
||||
if (aFileNameW->lpstrFile) {
|
||||
ConvertWtoA(aFileNameW->lpstrFile, MAX_PATH, fileA);
|
||||
ConvertWtoA(aFileNameW->lpstrFile, FILE_BUFFER_SIZE, fileA);
|
||||
ofnA.lpstrFile = fileA;
|
||||
ofnA.nMaxFile = MAX_PATH;
|
||||
ofnA.nMaxFile = FILE_BUFFER_SIZE;
|
||||
if (strlen(fileA)) {
|
||||
// find last file offset
|
||||
ofnA.nFileOffset = strrchr(fileA, '\\') - fileA + 1;
|
||||
|
|
|
@ -48,6 +48,14 @@ struct IActiveIMMApp;
|
|||
struct MethodInfo;
|
||||
class nsIEventQueue;
|
||||
|
||||
// we used to use MAX_PATH
|
||||
// which works great for one file
|
||||
// but for multiple files, the format is
|
||||
// dirpath\0\file1\0file2\0...filen\0\0
|
||||
// and that can quickly be more than MAX_PATH (260)
|
||||
// see bug #172001 for more details
|
||||
#define FILE_BUFFER_SIZE 4096
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper around the thread running the message pump.
|
||||
|
|
Загрузка…
Ссылка в новой задаче