Skip to content

Commit 59d057d

Browse files
committed
Make remove_inline() only backup the inline-file to be removed
Before, this would also backup the inline-index. Signed-off-by: Richard T Bonhomme <[email protected]>
1 parent 10fcbd1 commit 59d057d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

easytls

+4-11
Original file line numberDiff line numberDiff line change
@@ -3131,7 +3131,7 @@ remove_inline ()
31313131

31323132
# Move
31333133
if [ -z "${force_remove}" ]; then
3134-
"${EASYTLS_MV}" "${inline_file}" "${inline_file}-deleteme" || \
3134+
"${EASYTLS_MV}" "${inline_file}" "${EASYTLS_TEMP_DELETED}" || \
31353135
die "Failed to move: ${inline_file}"
31363136
else
31373137
"${EASYTLS_MV}" "${inline_file}" "${inline_file}-badhash" || \
@@ -3142,21 +3142,13 @@ remove_inline ()
31423142
if inline_index_update del; then
31433143
# Remove
31443144
if [ -z "${force_remove}" ]; then
3145-
"${EASYTLS_RM}" "${inline_file}-deleteme" || \
3145+
"${EASYTLS_RM}" "${EASYTLS_TEMP_DELETED}" || \
31463146
die "Failed to remove: ${inline_file}"
31473147
fi
31483148
else
3149-
# Restore original inline-index
3150-
if [ -f "${EASYTLS_INLINE_INDEX}-deleted" ]; then
3151-
"${EASYTLS_RM}" -f "${EASYTLS_INLINE_INDEX}"
3152-
"${EASYTLS_MV}" "${EASYTLS_INLINE_INDEX}-deleted" \
3153-
"${EASYTLS_INLINE_INDEX}" || \
3154-
die "remove_inline - Restore original inline-index"
3155-
fi
3156-
31573149
# Undo move
31583150
if [ -z "${force_remove}" ]; then
3159-
"${EASYTLS_MV}" "${inline_file}-deleteme" "${inline_file}" || \
3151+
"${EASYTLS_MV}" "${EASYTLS_TEMP_DELETED}" "${inline_file}" || \
31603152
die "Failed to restore: ${inline_file}"
31613153
else
31623154
"${EASYTLS_MV}" "${inline_file}-badhash" "${inline_file}" || \
@@ -9532,6 +9524,7 @@ vars_setup()
95329524
set_var EASYTLS_TEMP_LIST "${EASYTLS_DATA_DIR}/easytls-temp.list"
95339525
set_var EASYTLS_TEMP_RECORD "${EASYTLS_DATA_DIR}/easytls-temp.record"
95349526
set_var EASYTLS_TEMP_LOCK "${EASYTLS_DATA_DIR}/easytls-temp.lock.d"
9527+
set_var EASYTLS_TEMP_DELETED "${EASYTLS_DATA_DIR}/easytls-temp.deleted"
95359528

95369529
set_var EASYTLS_CA_IDENTITY "${EASYTLS_DATA_DIR}/easytls-ca-identity.txt"
95379530
set_var TLSKEY_SUBNAME "NOSUBKEY"

0 commit comments

Comments
 (0)