Comments (10)
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
Hi Ugo,
I need a better description on how to reproduce the bug. This never happened to me.
It's normal to receive the event Add followed by the event Modified. But, you should not be getting a repeated event. May be you have a symlink folder inside the folder tree watched?
from efsw.
Original comment by Ugo Robain (Bitbucket: wizzhard, GitHub: wizzhard).
I don't know why but if I inherit an object from FileWatcher and QObject is causes the events to be duplicated sometimes, in fact events come from two differents threads. I have separated FileWatcher from my QObject and it works now.
I assume it is caused by QObject but it could come from another reason, this is one of the most probable to me.
Thx, I think we can close the bug.
from efsw.
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
Great. Let me know if you find any other problem!
from efsw.
Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).
Facing similar problem. Even removing QObject didn't solve problem.
Also we should support using QObject if we are using Qt. Without QObject most of things we can't use. I've already created a bug with more info on this.
We should reopen this and attach to new reported one.
from efsw.
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
If this a Qt issue i will not give any kind of support because it's out of the scope of the project. If the bug comes from something in the library, i'm glad to see what's failing, but first i need a simple proof that this is an issue in the library ( code sample, and how to replicate the problem ).
from efsw.
Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).
Hi Martin,
Facing again but only in MAC this time.
http://pastebin.com/xpjLNZmx - CPP File
http://pastebin.com/GhuanL9D - H File
Contains both classes Watcher and listener. I've disabled all Qt part but result still same.
Yosemite MAC OS
Qt: 5.3.2 (May not be useful for you :) )
OutPut:
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Modified
"/Volumes/Work/Projects/www/market/public/index.php" : FILETYPE has event Modified
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Modified
"/Volumes/Work/Projects/www/market/public/index.php" : FILETYPE has event Modified
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php.sb-6dff1e29-JKuUXq" ) has event Delete
Refresh dir "/Volumes/Work/Projects/www/market/public"
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Added
Refresh dir "/Volumes/Work/Projects/www/market/public"
IGNORing ADD
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Modified
DIR ( "/Volumes/Work/Projects/www/market/" ) FILE ( "public" ) has event Modified
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php.sb-6dff1e29-JKuUXq" ) has event Delete
Refresh dir "/Volumes/Work/Projects/www/market/public"
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Added
Refresh dir "/Volumes/Work/Projects/www/market/public"
IGNORing ADD
DIR ( "/Volumes/Work/Projects/www/market/public/" ) FILE ( "index.php" ) has event Modified
"/Volumes/Work/Projects/www/market/public/index.php" : FILETYPE has event Modified
Please note: FILETYPE containing line is not duplicate. Its handled. (not good as of now)
Can you see what's the issue or anything I'm doing wrong.
Thanks,
Yash
from efsw.
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
Hi Yash!
It's not rare to receive two modified events in row, that depends on how the files are modified by the software who's modifying the file.
You can try to disable some flags considered as Modified
in FileWatcherFSEvents.hpp
, you can change:
#!c++
efswFSEventsModified = efswFSEventStreamEventFlagItemFinderInfoMod |
efswFSEventStreamEventFlagItemModified |
efswFSEventStreamEventFlagItemInodeMetaMod |
efswFSEventStreamEventFlagItemChangeOwner |
efswFSEventStreamEventFlagItemXattrMod
for something that only takes the Modified flag as Modified ( this wouldn't be correct, but, you can try ):
#!c++
efswFSEventsModified = efswFSEventStreamEventFlagItemModified
The way you get this notifications is handled mostly by the OS, the only thing i can change is that flags that i mentioned.
For me it looks OK your log, but i don't know what's going on in the background ( how the files are being modified ).
Regards!
from efsw.
Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).
ok I will try and let you know. Thanks for quick comment.
-Yash
from efsw.
Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).
Doesn't help. Same problem. If I found anything relevant I'll post here.
from efsw.
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
Ok, no problem! It doesn't look as a bug at all, it seems that it's just a file being modified two times in a row.
from efsw.
Related Issues (20)
- How to use QT-Creator to open the project 'qtreator-win' ? HOT 2
- Monitor multiple files failures under Windows HOT 6
- Generic watcher fails to watch sub-sub directories HOT 6
- Filename passed without extension HOT 1
- Cannot track symlinked file in Linux HOT 10
- Bazel Building HOT 1
- On MacOS, actions happening shortly after starting watcher are not reported HOT 19
- CMake multi config issue HOT 2
- Support Windows long path aware HOT 4
- Check Return Code and Allow Buffer Customization in `ReadDirectoryChangesW()` Function HOT 1
- Paranoid exit code? HOT 2
- MacOS build on server HOT 1
- [Bug] Crash while thread running after FileWatcherInotfiy destructed. HOT 16
- Premake5 macosx after gmake2 ... [CI Server] HOT 1
- Last modified file remembered and failing to fire event under Windows HOT 5
- Premake links in ReadMe is dead HOT 1
- FSEventStreamScheduleWithRunLoop has been deprecated in MacOS 13 HOT 3
- Nested template syntax breaks LEGACY builds HOT 3
- Generic file watcher doesn't report new directories on network drives HOT 2
- memory leak doubt and thread conflict HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efsw.