X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fabook_local_file.php;h=d22114f6c4b0d636eebb5d2ff2bcb1f4e13a85ba;hp=ee1584052eb6186f542d78bebe754b955eab0bf7;hb=d5d43e5767a6d22566977b114d56cd8974b30deb;hpb=9d4786fb6b179a57c71b8210f85ac74693e8a2e0 diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index ee158405..d22114f6 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -132,7 +132,7 @@ class abook_local_file extends addressbook_backend { $this->error = ''; $file = $this->filename; $create = $this->create; - $fopenmode = ($this->writeable ? 'a+' : 'r'); + $fopenmode = (($this->writeable && is_writable($file)) ? 'a+' : 'r'); /* Return true is file is open and $new is unset */ if($this->filehandle && !$new) {