-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
I recently watched a CppCon talk where the speaker said that to delete a directory tree on Windows, one should first rename files to a random name in %TEMP%, then delete.
I noticed that Poco::File::remove(bool recursive) is using the same algorithm on both UNIX and Windows.
https://github.com/pocoproject/poco/blob/develop/Foundation/src/File.cpp#L262
https://github.com/pocoproject/poco/blob/develop/Foundation/src/File_UNIX.cpp#L368
https://github.com/pocoproject/poco/blob/develop/Foundation/src/File_WIN32.cpp#L305
The Windows algorithm should be changed to avoid this potential data race.
Reactions are currently unavailable