From 5b1c0d4c6eb8116b9b98eb387368931d06d5ffe9 Mon Sep 17 00:00:00 2001 From: SubJunk Date: Mon, 18 Jun 2012 11:41:46 +1200 Subject: [PATCH] Allow PMS_HOME with spaces in path by quoting variable Fixes PMS #1451: https://code.google.com/p/ps3mediaserver/issues/detail?id=1451 From https://github.com/ps3mediaserver/ps3mediaserver/commit/0de2621ecdb72e980595827d80906efc40c713c9 --- src/main/external-resources/UMS.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/external-resources/UMS.sh b/src/main/external-resources/UMS.sh index e004cd38a..620f54a94 100644 --- a/src/main/external-resources/UMS.sh +++ b/src/main/external-resources/UMS.sh @@ -1,7 +1,7 @@ #!/bin/sh CMD=`readlink -f $0` -DIRNAME=`dirname $CMD` +DIRNAME=`dirname "$CMD"` # OS specific support (must be 'true' or 'false'). cygwin=false; @@ -21,12 +21,12 @@ fi # Setup PMS_HOME if [ "x$PMS_HOME" = "x" ]; then - PMS_HOME=$DIRNAME + PMS_HOME="$DIRNAME" fi export PMS_HOME # XXX: always cd to the working dir: https://code.google.com/p/ps3mediaserver/issues/detail?id=730 -cd $PMS_HOME +cd "$PMS_HOME" # Setup the JVM if [ "x$JAVA" = "x" ]; then