Giter Club home page Giter Club logo

Comments (10)

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


Great. Let me know if you find any other problem!

from efsw.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).


ok I will try and let you know. Thanks for quick comment.

-Yash

from efsw.

SpartanJ avatar SpartanJ commented on August 29, 2024

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.

SpartanJ avatar SpartanJ commented on August 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.