From d754d8806df164913cf239be5750f467f176d343 Mon Sep 17 00:00:00 2001 From: jamke <47451874+jamke@users.noreply.github.com> Date: Sun, 30 May 2021 19:37:16 +0700 Subject: [PATCH] Fix multiple issues in qvm-copy-to-vm2.sh Fix multiple issues with filenames containing spaces and starting dashes. The result is not tested by me at all, please check the changes before use. --- code/productivity/qvm-copy-to-vm2.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/productivity/qvm-copy-to-vm2.sh b/code/productivity/qvm-copy-to-vm2.sh index ab7594d..3a824e6 100644 --- a/code/productivity/qvm-copy-to-vm2.sh +++ b/code/productivity/qvm-copy-to-vm2.sh @@ -4,12 +4,12 @@ # qvm-copy-to-dom0 # command line parameters -Source=$1 # must be present -AppVM=$2 # must be present -Destination=$3 # must be present +Source="$1" # must be present +AppVM="$2" # must be present +Destination="$3" # must be present # if no Destination given on commandline use /home/user/QubesIncoming -if [ -z "$3" ];then Destination=/home/user/QubesIncoming; fi +if [ -z "$Destination" ];then Destination="/home/user/QubesIncoming"; fi # copy file from dom0 to AppVM -qvm-run --pass-io $AppVM "cat $Source" > $Destination +qvm-run --pass-io $AppVM "cat -- \"$Source\"" > "$Destination"