From 81c25bbf080013d071c96f4ed49c083bfbdf8cd6 Mon Sep 17 00:00:00 2001 From: Francesco Montanari Date: Mon, 25 Nov 2019 21:31:39 +0200 Subject: [PATCH] fix No such file or directory error for new installs --- setup/webmail.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup/webmail.sh b/setup/webmail.sh index 7dfeaac6..f44ea047 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -52,8 +52,10 @@ elif [[ "$UPDATE_KEY" != `cat /usr/local/lib/roundcubemail/version` ]]; then fi if [ $needs_update == 1 ]; then # if upgrading from 1.3.x, clear the temp_dir - if [ "$(cat /usr/local/lib/roundcubemail/version | cut -c1-3)" == '1.3' ]; then - find /var/tmp/roundcubemail/ -type f ! -name 'RCMTEMP*' -delete + if [ -f /usr/local/lib/roundcubemail/version ]; then + if [ "$(cat /usr/local/lib/roundcubemail/version | cut -c1-3)" == '1.3' ]; then + find /var/tmp/roundcubemail/ -type f ! -name 'RCMTEMP*' -delete + fi fi # install roundcube