From 762190d10becf6ea348644ae489d4c8e89562c43 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Sun, 7 Feb 2016 20:47:19 -0800 Subject: [PATCH] Fix: /mnt/user path transpose tweaks to handle spaces in path names better --- plugins/dynamix.vm.manager/scripts/qemu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix.vm.manager/scripts/qemu.php b/plugins/dynamix.vm.manager/scripts/qemu.php index 0494c891b..df2136df5 100755 --- a/plugins/dynamix.vm.manager/scripts/qemu.php +++ b/plugins/dynamix.vm.manager/scripts/qemu.php @@ -11,7 +11,7 @@ if (!isset($argv[1])) { function detect_user_share(&$arg) { - $arg = preg_replace_callback('|(/mnt/user/[^,]+\.[^, ]+)[, ]?|', function($match) { + $arg = preg_replace_callback('|(/mnt/user/[^,]+\.[^,\s]*)|', function($match) { if (is_file($match[0])) { // resolve the actual disk or cache backing device for this user share path $realdisk = trim(shell_exec("getfattr --absolute-names -n user.LOCATIONS ".escapeshellarg($match[0])." 2>/dev/null|grep -Po '^user.LOCATIONS=\"\K[^\\\"]+'"));