]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp,mv,install: avoid excess stat calls on non-GNU
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2022 06:56:41 +0000 (23:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2022 06:57:15 +0000 (23:57 -0700)
commit197a570ff0a17db5c8e003645d154e57bddc70ce
treed24b9e3a13402b4bfbbf4b89721813d2ca1b6754
parent30c932a3098146128acfd839589f308ec1bb116d
cp,mv,install: avoid excess stat calls on non-GNU

* gl/lib/targetdir.c (target_directory_operand): New arg ST.
All callers changed.
* src/cp.c (do_copy):
* src/mv.c (main):
Avoid unnecessary stat call if target_directory_operand already
got the status.
gl/lib/targetdir.c
gl/lib/targetdir.h
src/cp.c
src/install.c
src/mv.c