This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author QueenSvetlana
Recipients QueenSvetlana, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-11-20.20:10:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574280631.99.0.502229085614.issue38868@roundup.psfhosted.org>
In-reply-to
Content
I posted my problem on Stack Overflow, but as of right now haven't received any answers. 

Link: https://stackoverflow.com/questions/58922332/shutil-cannot-delete-a-folder-with-a-hidden-desktop-ini-file

To summarize my problem: If you use copytree to copy a source folder that contains a desktop.ini file to a destination, and then call rmtree() to remove the destination folder (for example after zipping, you may want to remove the uncompressed destination folder), it will throw an error indicating it doesn't have permission to remove the folder. Using ignore_patterns() doesn't help either, or to quote my problem on SO:

It seems once the source contains a .ini file, even if it isn't copied to the destination, rmtree() will have a problem removing the destination folder.

Powershell has almost the same issue, however, unlike Python, if you tell PS to ignore the .ini file, it will remove the folder without crashing.

rmtree has no problem removing folders containing 0 ini files.
History
Date User Action Args
2019-11-20 20:10:32QueenSvetlanasetrecipients: + QueenSvetlana, paul.moore, tim.golden, zach.ware, steve.dower
2019-11-20 20:10:31QueenSvetlanasetmessageid: <1574280631.99.0.502229085614.issue38868@roundup.psfhosted.org>
2019-11-20 20:10:31QueenSvetlanalinkissue38868 messages
2019-11-20 20:10:31QueenSvetlanacreate