3

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 //?

Chris
  • 44,602
  • 16
  • 137
  • 156
bhuisgen
  • 31
  • 1

1 Answers1

2

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 //

Sahib
  • 223
  • 1
  • 10