From 97aa1a74db63674356b366647640fab09ba44e63 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 29 Mar 2010 21:24:39 +0000 Subject: [PATCH] Only allow opening existing files in docview framework. Use wxFD_FILE_MUST_EXIST when asking the user for the name of the file to open. Closes #11866. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 8350a41..635a252 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1625,7 +1625,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, GetLastDirectory(), wxEmptyString, &FilterIndex, - descrBuf); + descrBuf, + wxFD_OPEN | wxFD_FILE_MUST_EXIST); wxDocTemplate *theTemplate = NULL; if (!pathTmp.empty()) -- 2.7.4