Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.3.0
-
None
-
Win7 x64 and Linux 3.2.0-49-generic-pae #75-Ubuntu SMP Tue Jun 18 18:00:21 UTC 2013 i686 i686 i386 GNU/Linux
Description
If I create symbolic link and watch that link, then delete the link (the link's target exists and remains unchanged the entire time), I get a notification on deletion on Windows (Win7 x64), but not on Linux.
Here's some code that uses the Qt Test framework:
// Note: must create a symlink called "symlink" on disk in the current folder before running QFileSystemWatcher watcher; QStringList changedList; QFileSystemWatcher::connect( &watcher, &QFileSystemWatcher::fileChanged, [&]( const QString& filename ) { changedList.push_back( filename ); } ); watcher.addPath( "symlink" ); QTest::qWait( 100 ); // Let events flow through // Remove a link std::remove( "symlink" ); QTest::qWait( 100 ); // Let events flow through // Check the result QCOMPARE( 0, watcher.files().size() ); QCOMPARE( 1, changedList.size() ); QCOMPARE( "symlink", changedList[0] );
This passes on Win7 but fails on Linux.
Attachments
Issue Links
- relates to
-
QTBUG-15522 QFileSystemWatcher doesn't notify of changes of symbolic links
- Reported
-
QTBUG-20046 QFileSystemWatcher loses track of symbolic link when file is moved.
- Closed