core: Ensure we chown created directories too

This commit is contained in:
Colin Walters committed 2011-12-06 20:16:03 -05:00
1 parent c32141c2bf
commit a94e0b8bf8
2 files changed
+17 -10

No files matched your search

+7 -9
View File
@@ -1995,16 +1995,14 @@ checkout_one_directory (OstreeRepo *self,
if (!_ostree_repo_file_get_xattrs (dir, &xattr_variant, NULL, error))
goto out;
if (mkdir (dest_path, (mode_t)g_file_info_get_attribute_uint32 (dir_info, "unix::mode")) < 0)
{
ot_util_set_error_from_errno (error, errno);
g_prefix_error (error, "Failed to create directory '%s': ", dest_path);
goto out;
}
if (!ostree_set_xattrs (dest_file, xattr_variant, cancellable, error))
if (!ostree_create_file_from_input (dest_file, dir_info,
xattr_variant,
NULL,
OSTREE_OBJECT_TYPE_FILE,
NULL,
cancellable, error))
goto out;
if (!checkout_tree (self, dir, dest_path, cancellable, error))
goto out;