+2006-01-14 Perry
+ PATCH: [ 1403457 ] Support Unicode file filter files
+ Src: FileFilterMgr.cpp
+
2006-01-14 Kimmo
PATCH: [ 1372044 ] Add FileActionScript for folder compare actions
Src: DirActions.cpp DirView.h Merge.dsp
#include "stdafx.h"
#include "FileFilterMgr.h"
#include "RegExp.h"
+#include "UniFile.h"
#ifdef _DEBUG
#define new DEBUG_NEW
*/
FileFilter * FileFilterMgr::LoadFilterFile(LPCTSTR szFilepath, LPCTSTR szFilename)
{
- CStdioFile file;
- if (!file.Open(szFilepath, CFile::modeRead | CFile::shareDenyNone))
+ UniMemFile file;
+ if (!file.OpenReadOnly(szFilepath))
return NULL;
+
+ file.ReadBom(); // in case it is a Unicode file, let UniMemFile handle BOM
+
FileFilter *pfilter = new FileFilter;
pfilter->fullpath = szFilepath;
pfilter->name = szFilename; // default if no name