A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-April/111040.html below:

[Python-Dev] [Python-checkins] cpython (2.7): Fix closes issue10761: tarfile.extractall failure when symlinked files are

[Python-Dev] [Python-checkins] cpython (2.7): Fix closes issue10761: tarfile.extractall failure when symlinked files are [Python-Dev] [Python-checkins] cpython (2.7): Fix closes issue10761: tarfile.extractall failure when symlinked files areSenthil Kumaran orsenthil at gmail.com
Thu Apr 28 16:44:50 CEST 2011
On Thu, Apr 28, 2011 at 04:20:06PM +0200, Éric Araujo wrote:
> >          if hasattr(os, "symlink") and hasattr(os, "link"):
> >              # For systems that support symbolic and hard links.
> >              if tarinfo.issym():
> > +                if os.path.exists(targetpath):
> > +                    os.unlink(targetpath)
> 
> Is there a race condition here?

The lock to avoid race conditions (if you were thinking along those
lines) would usually be implemented at the higher level code which is
using extractall in threads.

Checking that no one else is accessing the file before unlinking may
not be suitable for the library method and of course, we cannot check
if someone is waiting to act on that file.

-- 
Senthil
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4