summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_fruit.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index ff981d0479b..07ee5654e5d 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -5332,7 +5332,8 @@ static NTSTATUS delete_invalid_meta_stream(
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
unsigned int *pnum_streams,
- struct stream_struct **pstreams)
+ struct stream_struct **pstreams,
+ off_t size)
{
struct smb_filename *sname = NULL;
int ret;
@@ -5343,6 +5344,10 @@ static NTSTATUS delete_invalid_meta_stream(
return NT_STATUS_INTERNAL_ERROR;
}
+ if (size == 0) {
+ return NT_STATUS_OK;
+ }
+
sname = synthetic_smb_fname(talloc_tos(),
smb_fname->base_name,
AFPINFO_STREAM_NAME,
@@ -5396,8 +5401,12 @@ static NTSTATUS fruit_streaminfo_meta_stream(
DBG_ERR("Removing invalid AFPINFO_STREAM size [%jd] from [%s]\n",
(intmax_t)stream[i].size, smb_fname_str_dbg(smb_fname));
- return delete_invalid_meta_stream(handle, smb_fname, mem_ctx,
- pnum_streams, pstreams);
+ return delete_invalid_meta_stream(handle,
+ smb_fname,
+ mem_ctx,
+ pnum_streams,
+ pstreams,
+ stream[i].size);
}
/*