summaryrefslogtreecommitdiff
path: root/pm/pm-functions.in
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-04-27 16:32:24 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-04-27 16:32:24 -0500
commit3c12201486d6470e6f3596704f8d305e71a143ea (patch)
treec865c146e5b72154ac8f8f5e447132ba6cf95d5a /pm/pm-functions.in
parent1fd4bb49ff73fff69fa6e4e94baeb9699fa2f00e (diff)
Fix bug that would cause init_logfile to die if the logfile did not exist.
Add an explicit check for file existence instead of relying on -O to do it for us. Thanks, Till Mass for pointing this out.
Diffstat (limited to 'pm/pm-functions.in')
-rw-r--r--pm/pm-functions.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index f69d5fa..aa9c2e6 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -188,7 +188,7 @@ init_logfile()
if [ -h "$1" ]; then
echo "$1 is a symbolic link, refusing to overwrite."
return 1
- elif [ ! -O "$1" ]; then
+ elif [ -f "$1" -a ! -O "$1" ]; then
echo "We do not own $1, refusing to overwrite."
return 1
elif [ -z "$1" ]; then