[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdelibs/kio/kio
From:       Allen Winter <winter () kde ! org>
Date:       2009-02-13 21:33:40
Message-ID: 1234560820.197600.10562.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 925692 by winterz:

backport SVN commit 925654 by tilladam:

When using the QFileSystemWatcher backend of KDirWatch, trust it to correctly
notify us when a file or diretory changes, instead of second guessing it based
on mtime. Adding a file to a directory does not always update the directory
mtime, for example, which makes this check fail in some situations.


 M  +8 -1      kdirwatch.cpp  


--- branches/KDE/4.2/kdelibs/kio/kio/kdirwatch.cpp #925691:925692
@@ -1081,7 +1081,14 @@
 #endif
     if ( (e->m_ctime != invalid_ctime) &&
           ((stat_buf.st_ctime != e->m_ctime) ||
-          (stat_buf.st_nlink != (nlink_t) e->m_nlink)) ) {
+          (stat_buf.st_nlink != (nlink_t) e->m_nlink))
+#if defined( HAVE_QFILESYSTEMWATCHER )
+          // we trust QFSW to get it right, the ctime comparisons above
+          // fail for example when adding files to directories on Windows
+          // which doesn't change the mtime of the directory
+        ||(e->m_mode == QFSWatchMode )
+#endif
+    ) {
       e->m_ctime = stat_buf.st_ctime;
       e->m_nlink = stat_buf.st_nlink;
       return Changed;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic