X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source3%2Fsmbd%2Fdosmode.c;h=a6ad107a01e68c40b100fc8365770df495a47bf5;hb=7d8354c719fa620a580f6d7d322ca80185c50c7e;hp=04d27c7a2eb4e6c268bf5758b6cbe1ae52966967;hpb=1a6eac2c37f4d80033e450731bd36a9af4b2bd1d;p=obnox%2Fsamba%2Fsamba-obnox.git diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 04d27c7a2eb..a6ad107a01e 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -732,16 +732,21 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname, old_mode = dos_mode(conn, smb_fname); - if (dosmode & FILE_ATTRIBUTE_OFFLINE) { - if (!(old_mode & FILE_ATTRIBUTE_OFFLINE)) { - lret = SMB_VFS_SET_OFFLINE(conn, smb_fname); - if (lret == -1) { - DEBUG(0, ("set_dos_mode: client has asked to " - "set FILE_ATTRIBUTE_OFFLINE to " - "%s/%s but there was an error while " - "setting it or it is not " - "supported.\n", parent_dir, - smb_fname_str_dbg(smb_fname))); + if ((dosmode & FILE_ATTRIBUTE_OFFLINE) && + !(old_mode & FILE_ATTRIBUTE_OFFLINE)) { + lret = SMB_VFS_SET_OFFLINE(conn, smb_fname); + if (lret == -1) { + if (errno == ENOTSUP) { + DEBUG(10, ("Setting FILE_ATTRIBUTE_OFFLINE for " + "%s/%s is not supported.\n", + parent_dir, + smb_fname_str_dbg(smb_fname))); + } else { + DEBUG(0, ("An error occurred while setting " + "FILE_ATTRIBUTE_OFFLINE for " + "%s/%s: %s", parent_dir, + smb_fname_str_dbg(smb_fname), + strerror(errno))); } } }