sys: Preserve permissions and preserve symlinks when copying

copy_all() is already doing that and this is important if we try to
use copy() for any file in the system root.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2020-04-10 08:10:56 -07:00
parent 7aec0d0183
commit c39be58e30
+1 -1
View File
@@ -227,7 +227,7 @@ int copy_all(const char *src, const char *dst)
int copy(const char *src, const char *dst)
{
return run_command_quiet("/bin/cp", src, dst, NULL);
return run_command_quiet("/bin/cp", "--preserve=all", "--no-dereference", src, dst, NULL);
}
int mkdir_p(const char *dir)