diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-11-02 12:32:00 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-11-02 17:27:00 -0400 |
commit | d23ae8b58e73665d6418137446b259a2666af345 (patch) | |
tree | db764577d16d4d50bee07fadbec071fdd76323c3 /mesonbuild/wrap | |
parent | 53febd08cd77b0455e78fe45e93b86505ba5b0e5 (diff) | |
download | meson-d23ae8b58e73665d6418137446b259a2666af345.zip meson-d23ae8b58e73665d6418137446b259a2666af345.tar.gz meson-d23ae8b58e73665d6418137446b259a2666af345.tar.bz2 |
wrap: Fix concurrent os.mkdir()
Since 0.59.0 Meson downloads multiple wraps in parallel, so the
packagecache directory could be created by one then the 2nd would hit
error when calling os.mkdir() because it already exists.
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r-- | mesonbuild/wrap/wrap.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 08da319..aeb3add 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -556,8 +556,7 @@ class Resolver: mlog.log('Using', mlog.bold(self.packagename), what, 'from cache.') return cache_path - if not os.path.isdir(self.cachedir): - os.mkdir(self.cachedir) + os.makedirs(self.cachedir, exist_ok=True) self.download(what, cache_path) return cache_path else: |