fix: failing to launch VMs from outside directory

https://github.com/quickemu-project/quickemu/pull/875
This commit is contained in:
zen0bit 2024-04-12 16:49:39 +02:00 committed by Martin Wimpress
parent 592271d46b
commit 29be0990fe
1 changed files with 3 additions and 0 deletions

View File

@ -1784,6 +1784,9 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
VMPATH=$(realpath "$(dirname "${VM}")")
VM_MONITOR_SOCKETPATH="${VMDIR}/${VMNAME}-monitor.socket"
VM_SERIAL_SOCKETPATH="${VMDIR}/${VMNAME}-serial.socket"
if [ ! -f "${disk_img}" ]; then
cd "${VMPATH}"
fi
# Backwards compatibility for ${driver_iso}
if [ -n "${driver_iso}" ] && [ -z "${fixed_iso}" ]; then