Took into respect eventual resolution of symbolic links

This commit is contained in:
Thomas Schmitt 2009-02-04 20:01:22 +00:00
parent d6f21fe906
commit c4b75b7811
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.03.162440"
#define Xorriso_timestamP "2009.02.04.200055"

View File

@ -1978,6 +1978,7 @@ int Xorriso_iso_lstat(struct XorrisO *xorriso, char *path, struct stat *stbuf,
/* @param flag bit0= give directory x-permission where is r-permission
bit1= do not transfer ACL or xattr
bit5= transfer ACL or xattr from eventual link target
*/
int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
char *disk_path, IsoNode *node, int flag)
@ -2009,7 +2010,8 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
if(xorriso->do_aaip & 5) {
ret= iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths,
&values, ((xorriso->do_aaip & 1) && !(flag & 2))
| (!(xorriso->do_aaip & 4)) << 2);
| ((!(xorriso->do_aaip & 4)) << 2)
| (flag & 32));
if(ret < 0) {
Xorriso_process_msg_queues(xorriso,0);
Xorriso_report_iso_error(xorriso, disk_path, ret,
@ -2442,7 +2444,7 @@ int Xorriso_copy_implicit_properties(struct XorrisO *xorriso, IsoDir *dir,
if(stat(nfd, &stbuf)==-1)
return(0);
Xorriso_transfer_properties(xorriso, &stbuf, nfd, (IsoNode *) dir,
((flag&1) && d==0));
((flag&1) && d==0) | 32);
sprintf(xorriso->info_text,
"Copied properties for %s", Text_shellsafe(ni, sfe, 0));
sprintf(xorriso->info_text+strlen(xorriso->info_text),
@ -2474,7 +2476,7 @@ int Xorriso_copy_properties(struct XorrisO *xorriso,
return(0);
}
Xorriso_transfer_properties(xorriso, &stbuf, disk_path, node,
((flag & 2) >> 1) | (((stbuf.st_mode & S_IFMT) == S_IFLNK) << 1));
((flag & 2) >> 1) | ((flag & 1) << 5));
xorriso->volset_change_pending= 1;
return(1);
}
@ -2672,7 +2674,7 @@ attach_source:;
} else if(is_dir) {
Xorriso_transfer_properties(xorriso, &stbuf, disk_path,
(IsoNode *) dir, ((stbuf.st_mode & S_IFMT) == S_IFLNK) << 1);
(IsoNode *) dir, 32);
if(!(flag&32)) {
ret= Xorriso_add_tree(xorriso, dir, img_path, disk_path, NULL,
flag&2);