Skip to content

Commit

Permalink
Proper warning message in console for invalid export dir preference -…
Browse files Browse the repository at this point in the history
  • Loading branch information
otsakir committed Mar 5, 2024
1 parent c5d1246 commit ca28a18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3644,8 +3644,10 @@ QString MainWindow::exportPath(const char *suffix) {
QString default_dir = QString::fromStdString(Settings::Settings::defaultExportDir.value());
if (!default_dir.isEmpty()) {
default_dir = QDir(default_dir).canonicalPath(); // validate the path
if (default_dir.isEmpty())
qWarning() << "invalid defaultExporDir";
if (default_dir.isEmpty()) {
std::string std_dir = default_dir.toStdString();
LOG(message_group::UI_Warning, "Default Export Directory '%1$d' preference is invalid.", std_dir);
}
}

// filename
Expand Down

0 comments on commit ca28a18

Please sign in to comment.