[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gui: Create user settings directory if it doesn't already exist
From: |
John Darrington |
Subject: |
Re: gui: Create user settings directory if it doesn't already exist |
Date: |
Tue, 8 Jun 2010 15:52:02 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
+ /* Get the name of the directory for user configuration files, then, if it
+ doesn't already exist, create it, since we might be the first program
+ to want to put files there. */
+ dirname = g_get_user_config_dir ();
+ if (stat (dirname, &s) == -1 && errno == ENOENT)
+ mkdir (dirname, 0777);
According to the recommendations at
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
We should create the directory with mode 0700.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature
- Re: gui: Create user settings directory if it doesn't already exist,
John Darrington <=