Giter Site home page Giter Site logo

simplefilewatcher's Issues

Unspecified behaviour whilst rec

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Jul 2012 at 9:03

What is the purpose of update?

I start some action and wait until some file is deleted afterwards. I think 
that I have missed the expected file delete event. Might be it is because file 
was deleted before I call "update". I do not understand the purpose of 
"update". Can I use the file watcher not to miss any events? How do I kick off 
the process to remove the file and detect the event of effect?

Original issue reported on code.google.com by [email protected] on 21 Nov 2014 at 7:41

Cannot compile

What steps will reproduce the problem?
1. Open Cygwin console
2. Navigate in build/gmake folder
3. run "make"

What is the expected output? What do you see instead?
Program does not compile, i get the following error:
$ make
==== Building SimpleDemo ====
FileWatcher.cpp
../../source/FileWatcher.cpp: In constructor »FW::FileWatcher::FileWatcher()«:
../../source/FileWatcher.cpp:43:15: Fehler: expected type-specifier before 
»FILEWATCHER_IMPL«
../../source/FileWatcher.cpp:43:15: Fehler: »int*« kann nicht nach 
»FW::FileWatcherImpl*« in assignment umgewandelt werden
../../source/FileWatcher.cpp:43:15: Fehler: expected »;« before 
»FILEWATCHER_IMPL«
SimpleDemo.make:131: recipe for target `../intermediate/Debug/FileWatcher.o' 
failed
make[1]: *** [../intermediate/Debug/FileWatcher.o] Error 1
Makefile:17: recipe for target `SimpleDemo' failed
make: *** [SimpleDemo] Error 2

What version of the product are you using? On what operating system?
2009-09-14 on Windows 7 64 bit

Please provide any additional information below.
I am using the compiler of cygwin

Thank you in advance!

Original issue reported on code.google.com by [email protected] on 26 Jan 2013 at 9:20

Busy loop

In the current code, the select call has a timeout of 0, which makes the
select return immediately.  It might be better to use the blocking form of
select (use NULL instead of giving it a pointer to a timeout of zero
seconds) or, even better, allow the user to give a pointer to a timeval to
use as the timeout for the select call.

Original issue reported on code.google.com by [email protected] on 12 Feb 2010 at 7:38

Linux: compile error

What steps will reproduce the problem?
1. Try to compile it on Arch Linux
2. Compile error: undefined function "open" error.

What version of the product are you using? On what operating system?
SVN r17

Please provide any additional information below.
Seems like #include <unistd.h> is missing (see patch file).

Original issue reported on code.google.com by [email protected] on 30 Oct 2013 at 9:27

Attachments:

WatchCallback with already freed WatchStruct

What steps will reproduce the problem?
1. load code DLL
2. fw = new FileWatcher
3. fw->addWatch("SameDir")
4. delete fw
5. unload code DLL
6. load code DLL
7. fw = new FileWatcher
8. fw->addWatch("SameDir")

What is the expected output? What do you see instead?

when the second code dll is loaded the OS executes a WatchCallback with a
WatchStruct ( passed in lpOverlapped ) that is already destroyed. ( I have
dumped the pointers with outputdebugstring ). The dwNumberOfBytesTransfered
varies. Returning when the size is 0 is not enough, sometimes its a bigger
value. To fix the issue I have made the following modification:

bool RefreshWatch(WatchStruct* pWatch,bool _clear = false)
{
return ReadDirectoryChangesW(pWatch->mDirHandle, pWatch->mBuffer,
sizeof(pWatch->mBuffer), FALSE, pWatch->mNotifyFilter, NULL,
&pWatch->mOverlapped, _clear ? 0 : WatchCallback) != 0;
}

This allows me to clear the callback ( _clear ? 0 : WatchCallback ). The
deactivation of the callback is done in DestroyWatch:

CancelIo(pWatch->mDirHandle);

--> RefreshWatch(pWatch,true);

if (!HasOverlappedIoCompleted(&pWatch->mOverlapped))



I also return immediately when dwNumberOfBytesTransfered is 0 in the
WatchCallback

void CALLBACK WatchCallback(DWORD dwErrorCode, DWORD
dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped)
    {
        if (dwNumberOfBytesTransfered == 0)
            return;



What version of the product are you using? On what operating system?

2009.05.14. Vista Ultimate 64Bit

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Sep 2009 at 3:33

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.