Discussion:
[Abook-devel] abook can't open addressbook file
David J Patrick
2015-01-18 00:02:39 UTC
Permalink
I've used abook on and off for many years, but recently, when I decided to
use it again, every attempt to open a --datafile fails! Intsead of opening
the file, abook renames the file, appending a "~", like addressbook~, and
then opens a fresh, empty file with nothing. Any clues as to why this might
be happening would be MOST appreciated, thanks
Raphaël Droz
2015-01-18 13:52:51 UTC
Permalink
Post by David J Patrick
I've used abook on and off for many years, but recently, when I decided to
use it again, every attempt to open a --datafile fails! Intsead of opening
the file, abook renames the file, appending a "~", like addressbook~, and
then opens a fresh, empty file with nothing. Any clues as to why this might
be happening would be MOST appreciated, thanks
I'd say: insufficient disk space.
David J Patrick
2015-01-18 19:13:49 UTC
Permalink
Post by Raphaël Droz
I'd say: insufficient disk space.
That's not it. I have 12gb in /home/ and 2gb available in /

It's really weird, I'm trying to open one of several addressbook files that
I USED to use with abook, but every time "~" is appended and a new (empty)
addressbook file is opened!
Raphaël Droz
2015-01-19 01:31:47 UTC
Permalink
Post by David J Patrick
Post by Raphaël Droz
I'd say: insufficient disk space.
That's not it. I have 12gb in /home/ and 2gb available in /
It's really weird, I'm trying to open one of several addressbook files that
I USED to use with abook, but every time "~" is appended and a new (empty)
addressbook file is opened!
What version are you using (or which commit/patches)?
What's the return value?

- Check if a *.new file is created.
- Check file/directory permissions and owner/group and ACL.

- Check save_database() from database.c which does:
1° fopen(<db>.new, "w")) or exit
2° if list isn't empty, write it to <db>.new [ never exit here ]
3° if access(<db>) rename(<db>, <db>~) (happens in your case) [ otherwise returns -1 ]
4° rename(<db>.new, <db>) [ otherwise returns -1 ]

A simple $ strace -e trace=file abook may give you a hint about what's
(probably) wrong with your filesystem "configuration".

Loading...