Changeset 267
- Timestamp:
- 03/14/07 07:18:39 (1 year ago)
- Files:
-
- trunk/THANKS (modified) (1 diff)
- trunk/configure.ac (modified) (1 diff)
- trunk/src/Config.cxx (modified) (3 diffs)
- trunk/src/main.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/THANKS
r261 r267 8 8 - Mr_Moustache <mr.moustache@laposte.net>, for his French translation. 9 9 - Stavros Giannouris <stavrosg2002@freemail.gr>, for his Greek translation. 10 - Tilman Sauerbeck <tilman@code-monkey.de>, for his patches. 10 11 - tbm <tbm@home.nl>, for his patches. 11 12 - VnPenguin <vnpenguin@gmail.com>, for his Vietnamese translation. trunk/configure.ac
r245 r267 28 28 dnl Check for libraries 29 29 POPPLER_REQUIRED=0.5.0 30 GLIB_REQUIRED=2. 6.030 GLIB_REQUIRED=2.8.0 31 31 GTK2_REQUIRED=2.6.0 32 32 trunk/src/Config.cxx
r224 r267 41 41 // Forward declarations. 42 42 gchar *getConfigFileName (void); 43 void makeDirWithParents (const gchar *);44 43 45 44 /// … … 503 502 gchar *configDir = 504 503 g_build_filename (g_get_user_config_dir (), PACKAGE, NULL); 505 makeDirWithParents (configDir);504 g_mkdir_with_parents (configDir, 0700); 506 505 gchar *configFile = g_build_filename (configDir, "main.conf", NULL); 507 506 g_free (configDir); … … 509 508 return configFile; 510 509 } 511 512 ///513 /// @brief Creates the directory and all its parent directories.514 ///515 /// If the directory already exists it does nothing.516 ///517 /// @param path The directory to create.518 ///519 void520 makeDirWithParents (const gchar *path)521 {522 // Get the list of directories to create.523 GList *dirs = NULL;524 gchar *dirName = g_strdup (path);525 while ( !g_file_test (dirName, G_FILE_TEST_EXISTS) )526 {527 dirs = g_list_prepend (dirs, dirName);528 dirName = g_path_get_dirname (dirName);529 }530 531 // Now create all of them.532 GList *dir = g_list_first (dirs);533 while ( NULL != dir )534 {535 if ( -1 == g_mkdir ((gchar *)dir->data, 0700) )536 {537 g_warning ("Couldn't make directory '%s'\n", (gchar *)dir->data);538 }539 g_free (dir->data);540 dir = g_list_next (dir);541 }542 g_list_free (dirs);543 }trunk/src/main.cxx
r256 r267 75 75 Config::getConfig().save (); 76 76 77 g_option_context_free (optionContext); 78 77 79 // All done!. 78 80 return EXIT_SUCCESS;
