Or, g_file_monitor().
test for existence, if it doesn't exist, unshare (obviously). if it does
GFileMonitor *monitor = g_file_monitor (the_shared_directory, ...);
g_signal_connect (monitor, "changed", monitor_cb, ...);
...
static void
monitor_cb (GFileMonitor *monitor, GFile *file, GFile *unused,
GFileMonitorEvent event, gpointer user_data)
{
switch (event)
{
case G_FILE_MONITOR_EVENT_DELETED:
unshare folder
break;
}
}
Or the inotify/fam/fsnotify/other file monitoring APIs in your language
binding, or if you're really desperate (read: don't be this desperate;
g_file_monitor() has a polling backend for desperate, no-native-file-
monitoring platforms), check on startup and poll. This will work even if
the folder is rmdir'd.
** Changed in: nautilus (Ubuntu)
Status: Triaged => Invalid
--
shared folder still shared even if recreated after deletion
https://bugs.launchpad.net/bugs/400830
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs