mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r2700: Fix bug where we could incorrectly set sparse attribute. Don't use
st_blksize, it isn't what you think....
Jeremy.
--his line, and those below, will be ignored--
M source/smbd/dosmode.c
(This used to be commit 0a40c1a50f
)
This commit is contained in:
parent
2d5bf9ec40
commit
8df096a75e
@ -135,8 +135,8 @@ uint32 dos_mode_from_sbuf(connection_struct *conn, SMB_STRUCT_STAT *sbuf)
|
||||
if (S_ISDIR(sbuf->st_mode))
|
||||
result = aDIR | (result & aRONLY);
|
||||
|
||||
#if defined (HAVE_STAT_ST_BLOCKS) && defined (HAVE_STAT_ST_BLKSIZE)
|
||||
if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)sbuf->st_blksize) {
|
||||
#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
|
||||
if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)STAT_ST_BLOCKSIZE) {
|
||||
result |= FILE_ATTRIBUTE_SPARSE;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user