From: Daan De Meyer Date: Sun, 6 Aug 2023 13:03:32 +0000 (+0200) Subject: Fix install_tree() file copy regression X-Git-Tag: v15~26^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd838fc8343cf3932ff07a8f09cba0b3758f22ef;p=thirdparty%2Fmkosi.git Fix install_tree() file copy regression If a target is set and the source is a file, we used to copy the file directory into the image. Let's restore that behavior. --- diff --git a/mkosi/tree.py b/mkosi/tree.py index 3cd2173cf..06e011986 100644 --- a/mkosi/tree.py +++ b/mkosi/tree.py @@ -107,7 +107,7 @@ def install_tree(config: MkosiConfig, src: Path, dst: Path, target: Optional[Pat with umask(~0o755): t.parent.mkdir(parents=True, exist_ok=True) - if src.is_dir(): + if src.is_dir() or (src.is_file() and target): copy_tree(config, src, t, preserve_owner=False) elif src.suffix == ".tar": extract_tar(src, t)