summaryrefslogtreecommitdiff
path: root/RealtimeSync/watcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'RealtimeSync/watcher.cpp')
-rw-r--r--RealtimeSync/watcher.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp
index e9793545..d03c98b8 100644
--- a/RealtimeSync/watcher.cpp
+++ b/RealtimeSync/watcher.cpp
@@ -96,18 +96,13 @@ public:
if (newExec - lastExec >= UPDATE_INTERVAL)
{
lastExec = newExec;
- allExisting_ = std::find_if(dirList.begin(), dirList.end(), notExisting) == dirList.end();
+ allExisting_ = std::find_if(dirList.begin(), dirList.end(), std::not1(std::ptr_fun(&ffs3::dirExists))) == dirList.end();
}
return allExisting_;
}
private:
- static bool notExisting(const Zstring& dirname)
- {
- return !ffs3::dirExists(dirname);
- }
-
mutable wxLongLong lastExec;
mutable bool allExisting_;
@@ -146,7 +141,9 @@ rts::WaitResult rts::waitForChanges(const std::vector<Zstring>& dirNames, WaitCa
if (rv == INVALID_HANDLE_VALUE)
{
- if (::GetLastError() == ERROR_FILE_NOT_FOUND) //no need to check this condition any earlier!
+ const DWORD lastError = ::GetLastError();
+ if ( lastError == ERROR_FILE_NOT_FOUND || //no need to check this condition any earlier!
+ lastError == ERROR_BAD_NETPATH) //
return CHANGE_DIR_MISSING;
const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + zToWx(*i) + wxT("\"");
bgstack15