mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
explorer: warn if directory does not exist
This commit is contained in:
parent
b433939ca8
commit
69ebcd53e6
@ -337,6 +337,19 @@ void VExplorer::handleEntryActivated(int p_idx)
|
|||||||
|
|
||||||
updateStarButton();
|
updateStarButton();
|
||||||
|
|
||||||
|
// Check if exists.
|
||||||
|
if (!QFileInfo::exists(m_entries[m_index].m_directory)) {
|
||||||
|
VUtils::showMessage(QMessageBox::Warning,
|
||||||
|
tr("Warning"),
|
||||||
|
tr("Fail to open directory <span style=\"%1\">%2</span>.")
|
||||||
|
.arg(g_config->c_dataTextStyle)
|
||||||
|
.arg(m_entries[m_index].m_directory),
|
||||||
|
tr("Please check if the directory exists."),
|
||||||
|
QMessageBox::Ok,
|
||||||
|
QMessageBox::Ok,
|
||||||
|
g_mainWin);
|
||||||
|
}
|
||||||
|
|
||||||
updateTree();
|
updateTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user