From acf388bc7be76bbc78291c78a224b90c725d4a0c Mon Sep 17 00:00:00 2001 From: Zhang Zhishan <824656766@qq.com> Date: Sat, 2 May 2020 18:26:55 +0800 Subject: [PATCH] Fix space problem for getting lock file. --- dev/debug_osync.sh | 2 +- dev/n_osync.sh | 2 +- osync.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index a321b67..dc7e733 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -3024,7 +3024,7 @@ function _HandleLocksLocal { # Skip the whole part if overwrite true if [ -s "$lockfile" ] && [ $overwrite != true ]; then - lockfileContent="$(head -c16384 $lockfile)" + lockfileContent="$(head -c16384 "$lockfile")" Logger "Master lock pid present: $lockfileContent" "DEBUG" lockPid="${lockfileContent%@*}" if [ $(IsInteger $lockPid) -ne 1 ]; then diff --git a/dev/n_osync.sh b/dev/n_osync.sh index 5e4a665..e4c8cc2 100644 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -450,7 +450,7 @@ function _HandleLocksLocal { # Skip the whole part if overwrite true if [ -s "$lockfile" ] && [ $overwrite != true ]; then - lockfileContent="$(head -c16384 $lockfile)" + lockfileContent="$(head -c16384 "$lockfile")" Logger "Master lock pid present: $lockfileContent" "DEBUG" lockPid="${lockfileContent%@*}" if [ $(IsInteger $lockPid) -ne 1 ]; then diff --git a/osync.sh b/osync.sh index 779cb2b..90a9ae1 100755 --- a/osync.sh +++ b/osync.sh @@ -2859,7 +2859,7 @@ function _HandleLocksLocal { # Skip the whole part if overwrite true if [ -s "$lockfile" ] && [ $overwrite != true ]; then - lockfileContent="$(head -c16384 $lockfile)" + lockfileContent="$(head -c16384 "$lockfile")" Logger "Master lock pid present: $lockfileContent" "DEBUG" lockPid="${lockfileContent%@*}" if [ $(IsInteger $lockPid) -ne 1 ]; then