I'm not sure you can solve this by extending the Nautilus plugin
interface. For example, what if the file is deleted by another tool
(e.g. rm)? Then Nautilus would have no idea about it, nevertheless
nautilus-share should still consider the file un-shared.

Here's my idea (please keep in mind that I'm a newbie here and don't
know anything about the internals of Nautilus, GNOME, or nautilus-share
other than what I've read here, so I apologize if this is nonsense):

Right now, nautilus-share keeps track of which files are shared by their
path, I think; that's what gives rise to the current bug, when two
different files have, at different times, the same path. What if instead
of this, we had a hidden file inside each shared folder, say .nautilus-
share-info, which contained some unique ID. All IDs corresponding to
currently shared folders are kept in nautilus-share's configuration,
~/.config/nautilus-share or whatever. Nautilus looks in each folder, if
it has a .nautilus-share-info, it pulls up the corresponding line from
its config and sets up shares accordingly. So, if you delete the folder,
you delete the hidden file, too, and no other folder will have the same
ID.

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to