From 5fe9cca17aa73e5a2b490908a36dbb006547a247 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Thu, 5 Feb 2015 20:11:05 +0000 Subject: Fix setting of CAN_DELETE and CAN_RENAME for enumerate --- daemon/gvfsbackendnfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/daemon/gvfsbackendnfs.c b/daemon/gvfsbackendnfs.c index 29353b88..cf2f25f9 100644 --- a/daemon/gvfsbackendnfs.c +++ b/daemon/gvfsbackendnfs.c @@ -1683,9 +1683,9 @@ enumerate_stat_cb (int err, g_file_info_get_symlink_target (info)); if ((g_file_attribute_matcher_matches (handle->op_job->attribute_matcher, - G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE) || - g_file_attribute_matcher_matches (handle->op_job->attribute_matcher, - G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME)) && + G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE) || + g_file_attribute_matcher_matches (handle->op_job->attribute_matcher, + G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME)) && handle->access_parent >= 0) { g_file_info_set_attribute_boolean (new_info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, handle->access_parent & W_OK); @@ -1868,9 +1868,9 @@ enumerate_cb (int err, struct nfs_context *ctx, void *data, void *private_data) op_job->attribute_matcher); if ((g_file_attribute_matcher_matches (op_job->attribute_matcher, - G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE) || - g_file_attribute_matcher_matches (op_job->attribute_matcher, - G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME)) && + G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE) || + g_file_attribute_matcher_matches (op_job->attribute_matcher, + G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME)) && handle->access_parent >= 0) { g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, handle->access_parent & W_OK); @@ -1947,11 +1947,9 @@ try_enumerate (GVfsBackend *backend, g_file_attribute_matcher_matches (attribute_matcher, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME)) { - char *dirname = g_path_get_dirname (filename); nfs_access2_async (op_backend->ctx, - dirname, + filename, enumerate_access_parent_cb, handle); - g_free (dirname); } else { -- cgit v1.2.1