Windows / C ++
Look for some recommendations on how to reset security attributes in a file after moving it to a new folder.
Our standard way of creating files (and downloading from the server) is to create a file in a temporary folder, and then when the file stream is omitted, the file is added. Once the download is complete, we will move the file to the final destination.
MoveFile () will pass security to the file when moving the file. In a specific configuration, this causes a problem where the default values โโfor the destination folder do not match the source folder. We cannot interfere with folder security ...
So, ultimately, I would like to perform an operation on a file after moving it. My real thinking is that I should get the security attributes of the folder into which it belongs, and then apply to the file after the move is complete.
source share