]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cdp: Add file modification detection to windows implemtation
authorEric Bollengier <eric@baculasystems.com>
Wed, 23 Mar 2022 10:08:10 +0000 (11:08 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
bacula/src/tools/cdp-client/folderwatcher.cpp

index e0d640383483267039dbfcdd014c01146527c3d5..ec44980ec1716804852965d2d712f7dd48edf03f 100644 (file)
@@ -249,7 +249,7 @@ FolderWatcher::~FolderWatcher()
    }
 }
 
-#else
+#else  // HAVE_WIN32
 
 BOOL IsDirectory(LPCTSTR szPath)
 {
@@ -281,7 +281,7 @@ void *thread_watcher(void *arg) {
 
       if (!ReadDirectoryChangesW(watcher->_dirHandle, (LPVOID) pBuffer,
                bsize, true,
-               FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE, 
+               FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE
                &dwBytesReturned,
                &overlapped,
                NULL)) {