summaryrefslogtreecommitdiff
path: root/localimap
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2006-05-06 12:29:02 +0000
committerJonas Smedegaard <dr@jones.dk>2006-05-06 12:29:02 +0000
commit136a7115a7d1f80f8f13775833e49c800c7d513a (patch)
treeb82d65e11c68efa5de001723ea4fc4286066205c /localimap
parent0ec8c01069e9265e4b519c5c1d3fde13752c0a42 (diff)
Check file size only if file exists.
Diffstat (limited to 'localimap')
-rwxr-xr-xlocalimap2
1 files changed, 1 insertions, 1 deletions
diff --git a/localimap b/localimap
index 29babd5..9817d9e 100755
--- a/localimap
+++ b/localimap
@@ -16,7 +16,7 @@ export LOGFILE="$HOME/dovecot.log"
#export LOGFILE="/dev/null"
# Avoid LOGFILE growing endlessly
-if [ "`ls -s "$LOGFILE" | awk '{print $1}'`" -gt 500 ]; then
+if [ -f "$LOGFILE" ] && [ "`ls -s "$LOGFILE" | awk '{print $1}'`" -gt 500 ]; then
mv -f "$LOGFILE" "$LOGFILE.bak"
fi