Patch from bug #591532.
g_filename_complete_get_completions() return value is meant to be a g_strfreev-compatible array i.e. NULL-terminated. However, pointer arrays aren't automagically NULL-terminated. This fixes bug 586868
If G_FILE_MONITOR_WATCH_MOUNTS isn't specified, don't do all the work when the mtab changes.
The default implementation of g_file_copy() checked the size of the file to copy to give useful progress updates unconditionally. This can cause long delays on 1-connection FTP servers while it tries to open a second connection before it returns EBUSY. This patch makes this query only happen when we actually send progress updates.
File attribute namespaces are delimited with "::", but build_attribute_list_for_copy only used ":", so we didn't copy any writable namespaces.
I'm not sure why we used the elaborate formula to convert the io-priority to the priority of the mainloop idle when emulating async i/o with idles. However, it causes the default io priority to be less than the normal idle prio, so the i/o won't be scheduled if there is an idle outstanding. There is really no great mapping to use here, doing blocking i/o in an idle of any prio is generally bad and apps doing a lot of async i/o should initialize threads. However, if we use the io-priority directly we at least avoid the starvation problem above and make things easier to understand.