From 7eae9b5dd4ea13029ff81630ac7a5307a70eab58 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 9 Feb 2020 02:46:30 -0500 Subject: localized warning when file doesn't exist for shell menu --- src/filetree.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/filetree.cpp') diff --git a/src/filetree.cpp b/src/filetree.cpp index 19f2555a..2f13db44 100644 --- a/src/filetree.cpp +++ b/src/filetree.cpp @@ -604,6 +604,12 @@ bool FileTree::showShellMenu(QPoint pos) itor = menus.emplace(item->originID(), mw).first; } + if (!QFile::exists(item->realPath())) { + log::error("{}", + tr("File '%1' does not exist, you may need to refresh.") + .arg(item->realPath())); + } + itor->second.addFile(item->realPath()); ++totalFiles; @@ -641,6 +647,12 @@ bool FileTree::showShellMenu(QPoint pos) continue; } + if (!QFile::exists(QString::fromStdWString(fullPath))) { + log::error("{}", + tr("File '%1' does not exist, you may need to refresh.") + .arg(QString::fromStdWString(fullPath))); + } + itor->second.addFile(QString::fromStdWString(fullPath)); } } -- cgit v1.3.1