summaryrefslogtreecommitdiff
path: root/lib/spack/spack/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/patch.py')
-rw-r--r--lib/spack/spack/patch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py
index c970f4dfdc..5742f312ce 100644
--- a/lib/spack/spack/patch.py
+++ b/lib/spack/spack/patch.py
@@ -131,7 +131,10 @@ class UrlPatch(Patch):
patch_stage.fetch()
patch_stage.check()
patch_stage.cache_local()
- patch_stage.expand_archive()
+
+ if spack.util.compression.allowed_archive(self.url):
+ patch_stage.expand_archive()
+
self.path = os.path.abspath(
os.listdir(patch_stage.path).pop()
)