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:
parent
4a89971ee4
commit
77858aac6a
|
@ -912,6 +912,9 @@ bool isRelatedRootFolder(const generic_string & relatedRoot, const generic_strin
|
||||||
|
|
||||||
void FileBrowser::addRootFolder(generic_string rootFolderPath)
|
void FileBrowser::addRootFolder(generic_string rootFolderPath)
|
||||||
{
|
{
|
||||||
|
if (not ::PathFileExists(rootFolderPath.c_str()))
|
||||||
|
return;
|
||||||
|
|
||||||
// make sure there's no '\' at the end
|
// make sure there's no '\' at the end
|
||||||
if (rootFolderPath[rootFolderPath.length() - 1] == '\\')
|
if (rootFolderPath[rootFolderPath.length() - 1] == '\\')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue