Replace mkdir by g_mkdir for

increased cross-platform compatibility.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13541 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2006-03-08 15:59:46 +00:00
parent 7ce02733e8
commit 6ef3e79b63

View File

@ -35,6 +35,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include <glib/gstdio.h>
#include <stdlib.h>
#include <stdio.h>
@ -77,13 +78,13 @@ MakeHomeDir (void)
* and not because its read-protected or other error.
* Go ahead and make it. Don't bother much with checking mkdir
* for errors; seems pointless. */
mkdir (path, S_IRWXU); /* perms = S_IRWXU = 0700 */
g_mkdir (path, S_IRWXU); /* perms = S_IRWXU = 0700 */
}
data = g_strconcat (path, "/data", NULL);
rc = stat (data, &statbuf);
if (rc)
mkdir (data, S_IRWXU);
g_mkdir (data, S_IRWXU);
g_free (path);
g_free (data);
@ -321,7 +322,7 @@ gnc_validate_directory (const gchar *dirname)
if (rc) {
switch (errno) {
case ENOENT:
rc = mkdir (dirname, S_IRWXU); /* perms = S_IRWXU = 0700 */
rc = g_mkdir (dirname, S_IRWXU); /* perms = S_IRWXU = 0700 */
if (rc) {
g_fprintf(stderr,
_("An error occurred while creating the directory:\n"