Skip to content

Commit 7f72572

Browse files
committed
resolve symlink when making log dir writable
1 parent 03a7f3b commit 7f72572

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4309,7 +4309,9 @@ def build_and_install_one(ecdict, init_env):
43094309
def ensure_writable_log_dir(log_dir):
43104310
"""Make sure we can write into the log dir"""
43114311
if build_option('read_only_installdir'):
4312-
# temporarily re-enable write permissions for copying log/easyconfig to install dir
4312+
# temporarily re-enable write permissions for copying log/easyconfig to install dir,
4313+
# ensuring that we resolve symlinks
4314+
log_dir = os.path.realpath(log_dir, strict=True)
43134315
if os.path.exists(log_dir):
43144316
adjust_permissions(log_dir, stat.S_IWUSR, add=True, recursive=True)
43154317
else:

0 commit comments

Comments
 (0)