Fix a crash problem of Folder as Project in debug build.

Make sure the folder does exist before adding it for monitoring.
This commit is contained in:
Don Ho 2016-03-18 18:01:46 +01:00
parent 4a89971ee4
commit 77858aac6a
1 changed files with 3 additions and 0 deletions

View File

@ -912,6 +912,9 @@ bool isRelatedRootFolder(const generic_string & relatedRoot, const generic_strin
void FileBrowser::addRootFolder(generic_string rootFolderPath)
{
if (not ::PathFileExists(rootFolderPath.c_str()))
return;
// make sure there's no '\' at the end
if (rootFolderPath[rootFolderPath.length() - 1] == '\\')
{