~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/wmconfig.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2009-01-26 00:18:14 UTC
  • mfrom: (1.3.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090126001814-ea5ceoy4uroruz72
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
#endif
120
120
 
121
121
int setDefault(const char *basename, const char *config) {
122
 
    const char *confDir = strJoin(getenv("HOME"), "/.icewm", NULL);
 
122
    const char *confDir = newstr(YApplication::getPrivConfDir());
123
123
    mkdir(confDir, 0777);
 
124
    const char *conf = strJoin(confDir, "/", basename, NULL);
 
125
    const char *confNew = strJoin(conf, ".new.tmp", NULL);
124
126
    delete[] confDir;
125
 
    const char *confNew = strJoin(getenv("HOME"), "/.icewm/", basename, ".new.tmp", NULL);
126
 
    const char *conf = strJoin(getenv("HOME"), "/.icewm/", basename, NULL);
127
127
    int fd = open(confNew, O_RDWR | O_TEXT | O_CREAT | O_TRUNC | O_EXCL, 0666);
128
128
    if(fd == -1)
129
129
    {