From e7707d5abd7365c89405963c7cac0c0382d9179e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 20 Dec 2010 10:23:27 -0800 Subject: From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on get but not on set. Autobuild-User: Jeremy Allison Autobuild-Date: Mon Dec 20 20:11:22 CET 2010 on sn-devel-104 --- source3/smbd/dosmode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 628f887187..2c6dcd00c6 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -318,7 +318,8 @@ static bool get_ea_dos_attribute(connection_struct *conn, if (S_ISDIR(smb_fname->st.st_ex_mode)) { dosattr |= aDIR; } - *pattr = (uint32)(dosattr & SAMBA_ATTRIBUTES_MASK); + /* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */ + *pattr = (uint32)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE)); DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr)); -- cgit