Retrieving group and owner information of current directory in nautilus-properties-window

Ken Clive <[email protected]>
Newsgroups gmane.comp.gnome.nautilus
Message-ID <CAOosp6JzRC6ajAf=-Q+0nmrWUscO1+WZhgob_Dh7tN=0e2WU+A@mail.gmail.com>
Hi, I'm Ken Clive, a contributor to the Ubuntu Desktop team, and I am
working on the following bug:

https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/822993

The "Apply permissions to enclosed files" button in the Permissions
tab of the file properties window does not recursively apply
owner/group permissions to enclosed files and subdirs within the
current dir.  So far, I've found that this button, when clicked,
connects to "apply_recursive_clicked()" in
nautilus-properties-window.c.  I've looked at the code, and there's no
place where the ownership and group info of the current dir is being
extracted, and thus, is not recursively applied to the dir's contents.

All I would need to add here is:  two variables of appropriate type to
store the current dir's owner/group, and some instructions in the for
loop near the end of apply_recursive_clicked() that take the current
dir's owner/group and recursively applies it to each of the contained
files/dirs.  This would only be allowed if the current user is either
root or the current dir's owner.  I've looked around a lot in the
source code and need a little help understanding how this could be
done.  Any and all assistance is appreciated!
-- 
nautilus-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/nautilus-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.