summaryrefslogtreecommitdiff
path: root/zen/dir_watcher.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
commit669df123648aaa6aeccc70206b5417bc48b4e9ae (patch)
tree463c107a8d6405020bb304f7a7253e6b64afeee0 /zen/dir_watcher.cpp
parent5.18 (diff)
downloadFreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip
5.19
Diffstat (limited to 'zen/dir_watcher.cpp')
-rw-r--r--zen/dir_watcher.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/zen/dir_watcher.cpp b/zen/dir_watcher.cpp
index a800fb80..e53b63e2 100644
--- a/zen/dir_watcher.cpp
+++ b/zen/dir_watcher.cpp
@@ -96,7 +96,7 @@ public:
//context of main thread
- void getChanges(std::vector<DirWatcher::Entry>& output) //throw FileError, ErrorNotExisting
+ void getChanges(std::vector<DirWatcher::Entry>& output) //throw FileError
{
boost::lock_guard<boost::mutex> dummy(lockAccess);
@@ -105,9 +105,6 @@ public:
{
const std::wstring msg = copyStringTo<std::wstring>(errorInfo->msg);
const std::wstring descr = copyStringTo<std::wstring>(errorInfo->descr);
-
- if (errorCodeForNotExisting(errorInfo->errorCode))
- throw ErrorNotExisting(msg, descr);
throw FileError(msg, descr);
}
@@ -163,9 +160,6 @@ public:
const DWORD lastError = ::GetLastError(); //copy before making other system calls!
const std::wstring errorMsg = replaceCpy(_("Cannot monitor directory %x."), L"%x", fmtFileName(directory));
const std::wstring errorDescr = formatSystemError(L"CreateFile", lastError);
-
- if (errorCodeForNotExisting(lastError))
- throw ErrorNotExisting(errorMsg, errorDescr);
throw FileError(errorMsg, errorDescr);
}
@@ -199,7 +193,6 @@ public:
const DWORD lastError = ::GetLastError(); //copy before making other system calls!
return shared_->reportError(replaceCpy(_("Cannot monitor directory %x."), L"%x", fmtFileName(dirnamePf)), formatSystemError(L"CreateEvent", lastError), lastError);
}
-
ZEN_ON_SCOPE_EXIT(::CloseHandle(overlapped.hEvent));
DWORD bytesReturned = 0; //should not be needed for async calls, still pass it to help broken drivers
@@ -465,9 +458,6 @@ DirWatcher::DirWatcher(const Zstring& directory) : //throw FileError
const ErrorCode lastError = getLastError(); //copy before making other system calls!
const std::wstring errorMsg = replaceCpy(_("Cannot monitor directory %x."), L"%x", fmtFileName(subdir));
const std::wstring errorDescr = formatSystemError(L"inotify_add_watch", lastError);
-
- if (errorCodeForNotExisting(lastError))
- throw ErrorNotExisting(errorMsg, errorDescr);
throw FileError(errorMsg, errorDescr);
}
bgstack15