Pass the full path to wxDirExists, not the relative path from the watched
directory as this won't work unless the watched directory is the same as the
current one.
Closes #13161.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67677
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxArrayInt::iterator changeType = changedFlags.begin();
for ( ; it != changedFiles.end(); ++it, ++changeType )
{
wxArrayInt::iterator changeType = changedFlags.begin();
for ( ; it != changedFiles.end(); ++it, ++changeType )
{
- wxFileName path;
- if ( wxDirExists(*it) )
- {
- path = wxFileName::DirName(
- basepath + wxFileName::GetPathSeparator() + *it
- );
- }
- else
- {
- path.Assign(basepath, *it);
- }
+ const wxString fullpath = w.GetPath() +
+ wxFileName::GetPathSeparator() +
+ *it;
+ const wxFileName path(wxDirExists(fullpath)
+ ? wxFileName::DirName(fullpath)
+ : wxFileName::FileName(fullpath));
wxFileSystemWatcherEvent event(*changeType, path, path);
SendEvent(event);
wxFileSystemWatcherEvent event(*changeType, path, path);
SendEvent(event);