diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 8fa42ca38..0147ad138 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -262,7 +262,11 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive, size_t pos = substring - fileName.c_str(); patterns.push_back(substring + 1); - generic_string dir(fileName, pos + 1); + generic_string dir(fileName.c_str(), pos + 1); // use char * to evoke: + // string (const char* s, size_t n); + // and avoid to call (if pass string) : + // string (const string& str, size_t pos, size_t len = npos); + getMatchedFileNames(dir.c_str(), patterns, fileNames, isRecursive, false); } else