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 5846144614
from
master)
This commit is contained in:
committed by
Dimitri Schoolwerth
parent
148f5f3dc9
commit
80f5928999
@@ -339,7 +339,7 @@ bool wxGenericFileDialog::Show( bool show )
|
|||||||
void wxGenericFileDialog::OnOk( wxCommandEvent &WXUNUSED(event) )
|
void wxGenericFileDialog::OnOk( wxCommandEvent &WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxArrayString selectedFiles;
|
wxArrayString selectedFiles;
|
||||||
m_filectrl->GetFilenames(selectedFiles);
|
m_filectrl->GetPaths(selectedFiles);
|
||||||
|
|
||||||
if (selectedFiles.Count() == 0)
|
if (selectedFiles.Count() == 0)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user