Hi Jaakko,

On 07/28/2015 02:48 PM, Jaakko Hannikainen wrote:
> If a file is moved to or from a config directory, IN_DELETE and
> IN_MODIFY events are not fired, so IN_MOVED_FROM and IN_MOVED_TO
> events have to be monitored.
> ---
>  vpn/vpn-config.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/vpn/vpn-config.c b/vpn/vpn-config.c
> index 293c64e..08ccb6c 100644
> --- a/vpn/vpn-config.c
> +++ b/vpn/vpn-config.c
> @@ -484,12 +484,12 @@ static void config_notify_handler(struct inotify_event 
> *event,
>       if (event->mask & IN_CREATE)
>               return;
>  
> -     if (event->mask & IN_DELETE) {
> +     if (event->mask & IN_DELETE || event->mask & IN_MOVED_FROM) {

What about

        if (event->mask & (IN_DELETE | IN_MOVED_FROM))

?

Thanks,
Daniel
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to