From cfd7d6ede03660b49ab812dde94b8ecd6cff58ec Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 26 Mar 2020 06:43:38 -0600 Subject: [PATCH] remove write-test file in restorePath --- borghelper.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/borghelper.sh b/borghelper.sh index cd7233f..9af2f54 100755 --- a/borghelper.sh +++ b/borghelper.sh @@ -12,7 +12,12 @@ cleanup () { # remove borg temp directory, if it exists if [ -d "${borgBaseDir}/tmp" ]; then if ! rm -rf "${borgBaseDir}/tmp" > /dev/null 2>&1; then - consoleError 3 "Script completed successfully but could not remove temporary directory at $borgBaseDir/tmp. Sorry to be messy." + consoleError 3 "Script completed successfully but could not remove temporary directory at '$borgBaseDir/tmp'. Sorry to be messy." + fi + fi + if [ -f "${restorePath}/touch.test" ]; then + if ! rm -f "${restorePath}/touch.test" > /dev/null 2>&1; then + consoleError 5 "Script completed successfully but could not remove test file at '$restorePath/touch.test'. Sorry to be messy." fi fi }