Correct wxDirExists() check in OS X wxFileSystemWatcher implementation.

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
This commit is contained in:
Vadim Zeitlin 2011-05-03 10:40:28 +00:00
parent 61490d3b60
commit d66ddd70c7

View File

@ -314,17 +314,12 @@ protected:
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);