]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Handle directories when copying untracked git files 1063/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Jul 2022 20:13:19 +0000 (22:13 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Jul 2022 20:13:19 +0000 (22:13 +0200)
mkosi/__init__.py

index 1971bd51285a1a5085849edc377f15b18d20e3df..02a6eb25f4c3fa8f055d7d133d5bf2720b79b28f 100644 (file)
@@ -3635,7 +3635,10 @@ def copy_git_files(src: Path, dest: Path, *, source_file_transfer: SourceFileTra
 
         dest_path.parent.mkdir(parents=True, exist_ok=True)
 
-        copy_file(src_path, dest_path)
+        if src_path.is_dir():
+            copy_path(src_path, dest_path)
+        else:
+            copy_file(src_path, dest_path)
 
 
 def install_build_src(args: MkosiArgs, root: Path, do_run_build_script: bool, for_cache: bool) -> None: