Kaydet (Commit) 55f054d2 authored tarafından Enrico Tröger's avatar Enrico Tröger

Added properties dialog (still far away from state ready).

Added file_patterns field.
Added utils_mkdir().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1200 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst a2f5700e
2007-01-17 Enrico Tröger <enrico.troeger@uvena.de>
* src/project.c, src/project.h:
Added properties dialog (still far away from state ready).
Added file_patterns field.
* src/utils.c, src/utils.h: Added utils_mkdir().
2007-01-17 Nick Treleaven <nick.treleaven@btinternet.com>
* src/callbacks.c, doc/geany.docbook:
......
This diff is collapsed.
......@@ -38,7 +38,7 @@ struct _GeanyProject
gchar *executable; // name of the project executable
// ... // fields for build process(run arguments and so on) should be added
gchar **file_patterns; // array of filename extension patterns
};
......
......@@ -781,11 +781,7 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
if (! g_file_test(dir, G_FILE_TEST_EXISTS))
{
geany_debug("creating config directory %s", dir);
#ifdef G_OS_WIN32
if (mkdir(dir) != 0) error_nr = errno;
#else
if (mkdir(dir, 0700) != 0) error_nr = errno;
#endif
error_nr = utils_mkdir(dir);
}
if (error_nr == 0 && ! g_file_test(conf_file, G_FILE_TEST_EXISTS))
......@@ -807,11 +803,7 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
if (! g_file_test(filedefs_dir, G_FILE_TEST_EXISTS))
{
#ifdef G_OS_WIN32
if (mkdir(filedefs_dir) != 0) error_nr = errno;
#else
if (mkdir(filedefs_dir, 0700) != 0) error_nr = errno;
#endif
error_nr = utils_mkdir(filedefs_dir);
}
if (error_nr == 0 && ! g_file_test(filedefs_readme, G_FILE_TEST_EXISTS))
{
......@@ -833,11 +825,7 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
if (! g_file_test(templates_dir, G_FILE_TEST_EXISTS))
{
#ifdef G_OS_WIN32
if (mkdir(templates_dir) != 0) error_nr = errno;
#else
if (mkdir(templates_dir, 0700) != 0) error_nr = errno;
#endif
error_nr = utils_mkdir(templates_dir);
}
if (error_nr == 0 && ! g_file_test(templates_readme, G_FILE_TEST_EXISTS))
{
......@@ -1481,3 +1469,15 @@ void utils_free_pointers(gpointer first, ...)
}
gint utils_mkdir(const gchar *path)
{
if (path == NULL || strlen(path) == 0)
return EFAULT;
#ifdef G_OS_WIN32
if (mkdir(path) != 0) return errno;
#else
if (mkdir(path, 0700) != 0) return errno;
#endif
return 0;
}
......@@ -154,4 +154,6 @@ gchar *utils_get_whitespace(gint amount);
* it will also be freed, the list should be ended with NULL */
void utils_free_pointers(gpointer first, ...);
gint utils_mkdir(const gchar *path);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment