diff --git a/src/python/jw/pkg/lib/util.py b/src/python/jw/pkg/lib/util.py index 0a3cf7d0..d5cc0fd5 100644 --- a/src/python/jw/pkg/lib/util.py +++ b/src/python/jw/pkg/lib/util.py @@ -198,7 +198,7 @@ async def copy( ret: list[str] = [] s_st = await ctx.src.stat(src_path) if dst_path and not await ctx.dst.is_dir(dst_path): - await ctx.dst.mkdir(dst_path) + await ctx.dst.mkdir(dst_path, ftype = s_st.ftype) for dirent in await ctx.src.readdir(src_path): s_path = f'{src_path}/{dirent}' if src_path else dirent d_path = f'{dst_path}/{dirent}' if dst_path else dirent @@ -213,6 +213,7 @@ async def copy( owner = owner, group = group, mode = mode, + ftype = s_st.ftype, throw = True, ) ret.append(d_path) @@ -242,6 +243,7 @@ async def copy( owner = owner, group = group, mode = mode, + ftype = (await ctx.src.stat(src_root)).ftype, throw = True, ) return ret