From 5de2cb9ae1ed011469a208ae07df913f7bee88eb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 May 2023 11:00:44 +0200 Subject: Allow passing custom permissions to cpfile() --- libbutl/filesystem.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libbutl/filesystem.cxx') diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx index bb3e8b0..07d0590 100644 --- a/libbutl/filesystem.cxx +++ b/libbutl/filesystem.cxx @@ -1695,9 +1695,12 @@ namespace butl } void - cpfile (const path& from, const path& to, cpflags fl) + cpfile (const path& from, + const path& to, + cpflags fl, + optional cperm) { - permissions perm (path_permissions (from)); + permissions perm (cperm ? *cperm : path_permissions (from)); auto_rmfile rm; cpfile::value> ( -- cgit v1.1