From 0369848943902bee7b2d6446c049fb47d9d4982f Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sun, 25 Jun 2017 14:41:56 +0800 Subject: [PATCH] bug-fix: user could not choose an existing empty folder as the root folder --- src/dialog/vnewnotebookdialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dialog/vnewnotebookdialog.cpp b/src/dialog/vnewnotebookdialog.cpp index a480dd41..49602db9 100644 --- a/src/dialog/vnewnotebookdialog.cpp +++ b/src/dialog/vnewnotebookdialog.cpp @@ -171,7 +171,9 @@ void VNewNotebookDialog::handleInputChanged() if (QFileInfo::exists(path)) { QDir dir(path); QStringList files = dir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden); - if (!files.isEmpty()) { + if (files.isEmpty()) { + pathOk = true; + } else { // Folder is not empty. configExist = VConfigManager::directoryConfigExist(path); showWarnLabel = true;