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 pitrou
Recipients eric.araujo, mrts, pitrou, rosslagerwall, schmir, tarek, teamnoir
Date 2011-01-05.17:06:01
SpamBayes Score 1.05314e-07
Marked as misclassified No
Message-id <1294247158.3701.14.camel@localhost.localdomain>
In-reply-to <>
Le mercredi 05 janvier 2011 à 16:58 +0000, Ross Lagerwall a écrit :
> Ross Lagerwall <> added the comment:
> Updated patch removes the race condition. Since an open follows symlinks, you can't just fstat the fd to see if it is a link. I followed the following to overcome this:

Nice. I am unsure about the following piece of code:

+        if stat.S_ISDIR(mode):
+            if stat.S_ISLNK(mode):
+                try:
+                    raise OSError("Cannot call rmtree on a symbolic
+                except OSError:
+                    onerror(os.fstatat, (dirfd, name), sys.exc_info())

If rmtree() encounters a symlink *inside* the tree, I would expect it to
simply remove the symlink, rather than choke and abort (it's also what
the unsafe implementation does).
Date User Action Args
2011-01-05 17:06:04pitrousetrecipients: + pitrou, schmir, tarek, eric.araujo, mrts, teamnoir, rosslagerwall
2011-01-05 17:06:01pitroulinkissue4489 messages
2011-01-05 17:06:01pitroucreate