summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/relocate.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index 7a36434736..e7c85fa4d9 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -447,7 +447,7 @@ def replace_prefix_bin(path_name, old_dir, new_dir):
data = f.read()
f.seek(0)
original_data_len = len(data)
- pat = re.compile(old_dir.encode('utf-8') + b'([^\0]*?)\0')
+ pat = re.compile(old_dir.encode('utf-8'))
if not pat.search(data):
return
ndata = pat.sub(replace, data)