I have chosen to un-assign myself from fixing this bug.  I have gained a
lot more insight into how to possibly implement a recursive ownership
change function, but am not familiar with the I/O aspect of it (there
seems to be a particular timing of pushing and popping jobs involved).
Basically, here is how far I've gotten:

1)  In src/nautilus-properties-window.c, there exists a function
apply_recursive_clicked() that is linked to the "Apply permissions to
enclosed files button".

2)  There is a for loop near the end of apply_recursive_clicked() that
takes the values from the permissions combo boxes and applies them
recursively to the contents.  Within this loop, the permissions are
applied using nautilus_file_set_permissions_recursive(), which is
located in libnautilus-private/nautilus-file-operations.c.

3)  In nautilus_file_set_permissions_recursive(), a SetPermissionsJob
object takes on the permissions values passed to it, but not the owner
and group.  I added char values for those to the function, but then had
to go back to the SetPermissionsJob class definition and add group and
owner as parameters (which may not be the optimal way to do this...).

4)  What's even more confusing now in
nautilus_file_set_permissions_recursive() is the following, after the
SetPermissionsJob object receives its values:

if (!nautilus_file_undo_manager_pop_flag ()) {
                job->common.undo_info = 
                        nautilus_file_undo_info_rec_permissions_new (job->file,
                                                                     
file_permissions, file_mask,
                                                                     
dir_permissions, dir_mask);
               }

        g_io_scheduler_push_job (set_permissions_job,
                           job,
                           NULL,
                           0,
                           NULL);


I found a nautilus_file_undo_info_rec_permissions_new() in 
nautilus-file-undo-operations.c, as well as 
nautilus_file_undo_info_ownership_new().  However, I'm not sure how I would 
implement nautilus_file_undo_info_ownership_new() since its name suggests that 
it isn't recursive.  I'm not sure where to progress from this point, but I have 
definitely gotten a lot clearer on how this all could be tied together.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/822993

Title:
  Applying Permissions to enclosed files in Nautilus' Folder Properties
  window doesn't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/nautilus/+bug/822993/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to