fsp->modified = True;
if (SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) == 0) {
- int dosmode;
trigger_write_time_update(fsp);
- dosmode = dos_mode(fsp->conn, fsp->fsp_name);
- if ((lp_store_dos_attributes(SNUM(fsp->conn)) ||
- MAP_ARCHIVE(fsp->conn)) &&
- !IS_DOS_ARCHIVE(dosmode)) {
- file_set_dosmode(fsp->conn, fsp->fsp_name,
+ if (!fsp->posix_open &&
+ (lp_store_dos_attributes(SNUM(fsp->conn)) ||
+ MAP_ARCHIVE(fsp->conn))) {
+ int dosmode = dos_mode(fsp->conn, fsp->fsp_name);
+ if (!IS_DOS_ARCHIVE(dosmode)) {
+ file_set_dosmode(fsp->conn, fsp->fsp_name,
dosmode | aARCH, NULL, false);
+ }
}
/*
"%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
smb_fname_str_dbg(smb_fname_dst)));
- if (lp_map_archive(SNUM(conn)) ||
- lp_store_dos_attributes(SNUM(conn))) {
+ if (!lp_unix_extensions() &&
+ (lp_map_archive(SNUM(conn)) ||
+ lp_store_dos_attributes(SNUM(conn)))) {
/* We must set the archive bit on the newly
renamed file. */
if (SMB_VFS_STAT(conn, smb_fname_dst) == 0) {