3
votes

I'm trying to do a file monitor on the root file system directory. I use g_file_new_for_path() with / as the path and create the monitor with g_file_monitor(). But at execution no events are reported. If I use the path // events are thrown.

Is is a bug with GIO or do I need to use //?

1

1 Answers

2
votes

From the docs of g_file_new_for_path:

path : A string containing a relative or absolute path. 
       The string must be encoded in the glib filename encoding

GLib file encoding iirc goes like this: [protocol:]//path/to/file

I think this should work too: file:/ which is an alias to //