feat: Preserve source image until conversion completes (#1251)

This commit is contained in:
Kroese
2026-07-12 23:33:10 +02:00
committed by GitHub
parent 7b741d3e4b
commit 0c268308a4
2 changed files with 6 additions and 10 deletions
+4 -6
View File
@@ -404,15 +404,13 @@ convertDisk() {
fi
fi
if ! rm -f "$SOURCE_FILE"; then
rm -f "$TMP_FILE"
error "Failed to remove old $DISK_DESC image $SOURCE_FILE."
if ! mv "$TMP_FILE" "$DST_FILE"; then
error "Failed to move converted $DISK_DESC image to $DST_FILE."
exit 79
fi
if ! mv "$TMP_FILE" "$DST_FILE"; then
rm -f "$TMP_FILE"
error "Failed to move converted $DISK_DESC image to $DST_FILE."
if ! rm -f "$SOURCE_FILE"; then
error "Failed to remove old $DISK_DESC image $SOURCE_FILE."
exit 79
fi
+2 -4
View File
@@ -1620,10 +1620,8 @@ else
showGuestInfo
if [[ "${NETWORK,,}" == "passt" || "${NETWORK,,}" == "slirp" ]]; then
if [ -z "$USER_PORTS" ]; then
info "Notice: because user-mode networking is active, when you need to forward custom ports to DSM, add them to the \"USER_PORTS\" variable."
fi
if isUserMode && [ -z "$USER_PORTS" ]; then
info "Notice: because user-mode networking is active, when you need to forward custom ports to DSM, add them to the \"USER_PORTS\" variable."
fi
fi