File attributes not preserved on copy


I am working on a filesystem driver for removable optical media. I have a weird problem while copying files from an NTFS volume to the optical media.

After the file is copied, Windows sends an IRP_MJ_SET_INFORMATION IRP with FileBasicInformation information class. Now the attributes field in the FILE_BASIC_INFORMATION structure is always zero even if the original file had read only, archive and/or hidden attribute set. So the file attributes are not preserved on copy unlike a copy between two NTFS harddisks or to a floppy disk.

Is this expected behaviour? Is there anything the filesystem driver needs to do during driver startup or volume mount to ensure that Windows sets the right file attributes on file copy? Any information is greatly appreciated.