Opened 15 years ago

Last modified 15 years ago

#1461 closed Patch

Patch for local folder auto-refresh

Reported by: chenhsiu Owned by:
Priority: normal Component: Other
Keywords: Cc: chenhsiu, Tim Kosse
Component version: Operating system type:
Operating system version:

Description

For me, it's quite inconvenient if the local download
folder can not refresh automatically.
Therefore I write a patch that enables the local folder
to be refreshed automatically each time when a new
file/folder creates or any write operations.

Just add FileChangeNotify.h & FileChangeNotify.cpp to
the project and apply patches to LocalView2.h &
LocalView2.cpp (base on the 2.2.10 source)

Attachments (1)

FZ_2_2_10_patch_for_auto-refresh.zip (6.9 KB) - added by chenhsiu 15 years ago.
zipped files

Download all attachments as: .zip

Change History (2)

Changed 15 years ago by chenhsiu

zipped files

comment:1 Changed 15 years ago by Tim Kosse

Thanks very much for your patch, such functionality is very
useful. Unfortunately your code is not thread-safe: Both a
user action and a thread callback can change the local
directory at the same time. This will very likely result in
a crash. Can you please modify your code so that
CFileChangeNotify sends a window message to the file list?
Also, your code does not limit the rate at which
notifications are sent, thus performance may suffer greatly.
Please add some code to limit it to no more than one update
each second (by wait on the thread handle with one second
timeout in the thread).

Note: See TracTickets for help on using tickets.