mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
vfs_fruit: move storing of modified struct adouble to ad_convert()
ad_convert() modified it, so let ad_convert() also save it to disk. No change in behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
99cc9ef82b
commit
b355a09576
@ -1071,6 +1071,7 @@ static int ad_convert(struct adouble *ad,
|
||||
int rc = 0;
|
||||
char *map = MAP_FAILED;
|
||||
size_t origlen;
|
||||
ssize_t len;
|
||||
bool ok;
|
||||
|
||||
origlen = ad_getentryoff(ad, ADEID_RFORK) +
|
||||
@ -1116,6 +1117,18 @@ static int ad_convert(struct adouble *ad,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ok = ad_pack(ad);
|
||||
if (!ok) {
|
||||
DBG_WARNING("ad_pack [%s] failed\n", smb_fname->base_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = sys_pwrite(ad->ad_fd, ad->ad_data, AD_DATASZ_DOT_UND, 0);
|
||||
if (len != AD_DATASZ_DOT_UND) {
|
||||
DBG_ERR("%s: bad size: %zd\n", smb_fname->base_name, len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1391,18 +1404,6 @@ static ssize_t ad_read_rsrc_adouble(struct adouble *ad,
|
||||
return len;
|
||||
}
|
||||
|
||||
ok = ad_pack(ad);
|
||||
if (!ok) {
|
||||
DBG_WARNING("ad_pack [%s] failed\n", smb_fname->base_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = sys_pwrite(ad->ad_fd, ad->ad_data, AD_DATASZ_DOT_UND, 0);
|
||||
if (len != AD_DATASZ_DOT_UND) {
|
||||
DBG_ERR("%s: bad size: %zd\n", smb_fname->base_name, len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
p_ad = ad_get_entry(ad, ADEID_FINDERI);
|
||||
if (p_ad == NULL) {
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user