Skip to content
Snippets Groups Projects
Commit e244a8ca authored by Simon McVittie's avatar Simon McVittie
Browse files

pv_cheap_tree_copy: Preserve permissions


It isn't particularly important either way, but there's no real reason
not to.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c87c6bda
No related branches found
No related tags found
No related merge requests found
......@@ -303,8 +303,8 @@ copy_tree_helper (const char *fpath,
return 1;
}
if (!glnx_shutil_mkdir_p_at (-1, nftw_data.dest_root, 0700, NULL,
error))
if (!glnx_shutil_mkdir_p_at (-1, nftw_data.dest_root,
sb->st_mode & 07777, NULL, error))
return 1;
return 0;
......@@ -318,8 +318,8 @@ copy_tree_helper (const char *fpath,
switch (typeflag)
{
case FTW_D:
/* For now we assume the permissions are not significant */
if (!glnx_shutil_mkdir_p_at (-1, dest, 0755, NULL, error))
if (!glnx_shutil_mkdir_p_at (-1, dest, sb->st_mode & 07777,
NULL, error))
return 1;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment