diff options
author | midipix <writeonce@midipix.org> | 2021-04-13 18:15:38 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-04-15 08:03:32 +0000 |
commit | c81d169af088b6b90d850d7c0f5c5daae6cfc4ba (patch) | |
tree | 4f9a8dbaff4ebae2ec685e8755fb1449644ee744 /src/helper/slbt_copy_file.c | |
parent | 7ae5c14d2b4cc2dce023dac9bdf6020962c7bcec (diff) | |
download | slibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.bz2 slibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.xz |
library: replace all uses of [slbt_]readlink() with [slbt_]readlinkat().
Diffstat (limited to 'src/helper/slbt_copy_file.c')
-rw-r--r-- | src/helper/slbt_copy_file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helper/slbt_copy_file.c b/src/helper/slbt_copy_file.c index e9abee5..7e549d9 100644 --- a/src/helper/slbt_copy_file.c +++ b/src/helper/slbt_copy_file.c @@ -6,6 +6,7 @@ /*******************************************************************/ #include <slibtool/slibtool.h> +#include "slibtool_driver_impl.h" #include "slibtool_spawn_impl.h" #include "slibtool_symlink_impl.h" #include "slibtool_errinfo_impl.h" @@ -16,13 +17,17 @@ int slbt_copy_file( char * src, char * dst) { + int fdcwd; char ** oargv; char * oprogram; char * cp[4]; int ret; + /* fdcwd */ + fdcwd = slbt_driver_fdcwd(dctx); + /* placeholder? */ - if (slbt_symlink_is_a_placeholder(src)) + if (slbt_symlink_is_a_placeholder(fdcwd,src)) return 0; /* cp argv */ |