# HG changeset patch # User mas01cr # Date 1185377966 0 # Node ID 12be3560ff0fa06f40f5147faddc29b27e6e7286 # Parent bd6bb994081b5054f1660aa415d279be0b6006a0 open(2) needs a third argument when O_CREAT is specified: give it modes of 0666 (like touch(1) does) as the mode is modified by the user's umask. diff -r bd6bb994081b -r 12be3560ff0f audioDB.cpp --- a/audioDB.cpp Tue Jul 24 15:36:07 2007 +0000 +++ b/audioDB.cpp Wed Jul 25 15:39:26 2007 +0000 @@ -416,8 +416,8 @@ */ void audioDB::create(const char* dbName){ - if ((dbfid = open (dbName, O_RDWR | O_CREAT | O_TRUNC)) < 0) - error("Can't open database file:", dbName); + if ((dbfid = open (dbName, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0) + error("Can't open database file", dbName); // go to the location corresponding to the last byte if (lseek (dbfid, O2_DEFAULTDBSIZE - 1, SEEK_SET) == -1)