فهرست منبع

bug-fix: user could not choose an existing empty folder as the root folder

Le Tan 8 سال پیش
والد
کامیت
0369848943
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/dialog/vnewnotebookdialog.cpp

+ 3 - 1
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;