aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2023-02-05 17:27:51 +0000
committermerakor <cem@ckyln.com>2023-02-05 17:27:51 +0000
commit8cfb0163f48c828cdadc82af3d598e588f8568a8 (patch)
treee1b5c7b3f6bca11575297bef45739224745fbea9 /src
parent56b2af53115d8ea4595fa70097455df496edd0cb (diff)
parent90c38101ad480af1a60defca0ffede0071a647ba (diff)
downloadcpt-8cfb0163f48c828cdadc82af3d598e588f8568a8.tar.gz
merge 7.0.2 release
FossilOrigin-Name: 728024803e355e064eaab2233a412f8eb1a3469774a6e5c793220f5be6a8dc10
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 8b6cd13..1896920 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -2315,7 +2315,7 @@ _tmp_cp() {
# second argument is not given, use the basename of the copied file.
_ret=${2:-${1##*/}}
_ret=$(_tmp_name "$_ret")
- cp "$1" "$_ret"
+ cp -p "$1" "$_ret"
out "$_ret"
}
@@ -2323,9 +2323,8 @@ _tmp_create() {
# Create given file to the temporary directory and return its name
create_tmp
_ret=$(_tmp_name "$1")
- # False positive, we are not reading from the file.
- # shellcheck disable=2094
- out "$_ret" 3>> "$_ret"
+ :> "$_ret" || return 1
+ out "$_ret"
}
create_tmp() {