fs: ensure-file: don't error if the file already exists
This commit is contained in:
parent
5b8f13d9cc
commit
af2f97d61e
|
@ -20,7 +20,7 @@ cpOverwrite() {
|
|||
cpNoOverwrite() {
|
||||
# --no-dereference in case the destination already exists as a symlink.
|
||||
# it will still follow directory-level intermediate symlinks: just not a leaf symlink
|
||||
cp --no-clobber --no-dereference "$cpfrom" "$cpto"
|
||||
cp --no-clobber --no-dereference "$cpfrom" "$cpto" || test -f "$cpto"
|
||||
}
|
||||
|
||||
cpNoOverwrite
|
||||
|
|
Loading…
Reference in New Issue