summaryrefslogtreecommitdiff
path: root/navit/popup.c
diff options
context:
space:
mode:
authortegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-11-07 09:02:38 +0000
committertegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-11-07 09:02:38 +0000
commit6913b7ca70125382f9bc76e15c86566331006913 (patch)
treee88fb45fbfe0d00dfa1c950ac12a7769b9652f56 /navit/popup.c
parent23ea172a20cbf4ec1fff5b7b4fdd70d0bff5e6b4 (diff)
downloadnavit-6913b7ca70125382f9bc76e15c86566331006913.tar.gz
Fix:Core:United *get_user_data_directory() functions with same body in navit.c
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3655 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/popup.c')
-rw-r--r--navit/popup.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/navit/popup.c b/navit/popup.c
index 8d20d2e12..7d0055d49 100644
--- a/navit/popup.c
+++ b/navit/popup.c
@@ -61,35 +61,11 @@ popup_set_no_passing(struct popup_item *item, void *param)
#endif
-/**
- * @brief Get the user data directory.
- * @param[in] create - create the directory if it does not exist
- *
- * @return char * to the data directory string.
- *
- * returns the directory used to store user data files (center.txt,
- * destination.txt, bookmark.txt, ...)
- *
- */
-char*
-popup_get_user_data_directory(gboolean create) {
- char *dir;
- dir = getenv("NAVIT_USER_DATADIR");
- if (create && !file_exists(dir)) {
- dbg(0,"creating dir %s\n", dir);
- if (file_mkdir(dir,0)) {
- dbg(0,"failed creating dir %s\n", dir);
- return NULL;
- }
- }
- return dir;
-} /* end: popup_get_user_data_directory(gboolean create) */
-
static void
popup_traffic_distortion(struct item *item, char *attr)
{
/* add the configuration directory to the name of the file to use */
- char *dist_filename = g_strjoin(NULL, popup_get_user_data_directory(TRUE),
+ char *dist_filename = g_strjoin(NULL, navit_get_user_data_directory(TRUE),
"/distortion.txt", NULL);
if (dist_filename) /* if we built the filename */
{