--- a/src/qtgui/rclmain_w.cpp
+++ b/src/qtgui/rclmain_w.cpp
@@ -1625,8 +1625,9 @@
// wantsfile: do we actually need a local file ? The only other
// case here is an url %u (ie: for web history).
- bool wantsfile = cmd.find("%f") != string::npos;
- bool wantsparentfile = cmd.find("%F") != string::npos;
+ bool wantsfile = cmd.find("%f") != string::npos && urlisfileurl(doc.url);
+ bool wantsparentfile = cmd.find("%F") != string::npos &&
+ urlisfileurl(doc.url);
if (wantsfile && wantsparentfile) {
QMessageBox::warning(0, "Recoll",