From: Vadim Zeitlin Date: Mon, 29 Mar 2010 21:24:39 +0000 (+0000) Subject: Only allow opening existing files in docview framework. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/97aa1a74db63674356b366647640fab09ba44e63 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 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 8350a4117f..635a2529bb 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())