]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Resolve source symlink in install_tree()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 2 Jul 2024 09:26:38 +0000 (11:26 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 2 Jul 2024 10:26:39 +0000 (12:26 +0200)
We do a bunch of checks on file extension and such, and those
should be done on the resolved filename and not on a symlink.

mkosi/__init__.py

index 82f79cabfbd21e5f64d06145b7df12e907224142..d1f9dda1d40821388c3b5289645fdc22bc12e1fd 100644 (file)
@@ -1558,6 +1558,8 @@ def install_tree(
     target: Optional[Path] = None,
     preserve: bool = True,
 ) -> None:
+    src = src.resolve()
+
     t = dst
     if target:
         t = dst / target.relative_to("/")