keep disk filename prefixes to assign value correctly

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-17 11:50:59 -08:00
parent 8cd7142d97
commit 720413760a

View File

@ -220,7 +220,7 @@ function parseDisk (disk) { // disk in format: STORAGE: FILENAME, ARG1=..., ARG2
let parsed = {}; let parsed = {};
let kvpairs = disk.split(","); let kvpairs = disk.split(",");
parsed.storage = kvpairs[0].split(":")[0]; parsed.storage = kvpairs[0].split(":")[0];
parsed.filename = kvpairs[0].split(":")[1].replace("iso/", ""); parsed.filename = kvpairs[0];
kvpairs.shift(); kvpairs.shift();
kvpairs.forEach((element) => { kvpairs.forEach((element) => {
let key = element.split("=")[0]; let key = element.split("=")[0];