From 80f59289999f272374a909fdef474631984f68dd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 24 Sep 2015 14:31:14 +0200 Subject: [PATCH] Use full paths when checking for existence in wxGenericFileDialog Use full path to the selected file before checking whether it exists, otherwise the check could fail even if the file does exist but the current directory is different from the one it is in. Closes #16698. (this is a backport of 5846144614134b36d16d2f14aa675bf888f3b32c from master) --- src/generic/filedlgg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 98ee38f0fd..0a9ff601dc 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -339,7 +339,7 @@ bool wxGenericFileDialog::Show( bool show ) void wxGenericFileDialog::OnOk( wxCommandEvent &WXUNUSED(event) ) { wxArrayString selectedFiles; - m_filectrl->GetFilenames(selectedFiles); + m_filectrl->GetPaths(selectedFiles); if (selectedFiles.Count() == 0) return;