summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@irssi.org>2009-02-10 20:45:27 +0000
committerahf <ahf@dbcabf3a-b0e7-0310-adc4-f8d773084564>2009-02-10 20:45:27 +0000
commit859d434c60cc973436304d47df763ff997ad7c08 (patch)
tree65261ab376e31648e29d56e71525840b0e47fa63 /src
parent3e58d2cc926301f6668b1a0ca4b16c62fd81cb03 (diff)
downloadirssi-859d434c60cc973436304d47df763ff997ad7c08.zip
Prefer g_path_get_dirname() over g_dirname().
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5010 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/log.c2
-rw-r--r--src/fe-common/core/completion.c4
-rw-r--r--src/fe-common/core/fe-log.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/log.c b/src/core/log.c
index 9b2bc8c4..67ff24c1 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -113,7 +113,7 @@ int log_start_logging(LOG_REC *log)
strcmp(log->real_fname, log->fname) != 0) {
/* path may contain variables (%time, $vars),
make sure the directory is created */
- dir = g_dirname(log->real_fname);
+ dir = g_path_get_dirname(log->real_fname);
mkpath(dir, log_dir_create_mode);
g_free(dir);
}
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index a145eb69..a1241c61 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -301,7 +301,7 @@ GList *filename_complete(const char *path, const char *default_path)
}
/* open directory for reading */
- dir = g_dirname(realpath);
+ dir = g_path_get_dirname(realpath);
dirp = opendir(dir);
g_free(dir);
g_free(realpath);
@@ -309,7 +309,7 @@ GList *filename_complete(const char *path, const char *default_path)
if (dirp == NULL)
return NULL;
- dir = g_dirname(path);
+ dir = g_path_get_dirname(path);
if (*dir == G_DIR_SEPARATOR && dir[1] == '\0') {
/* completing file in root directory */
*dir = '\0';
diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c
index 66bce64d..e3496a63 100644
--- a/src/fe-common/core/fe-log.c
+++ b/src/fe-common/core/fe-log.c
@@ -449,7 +449,7 @@ static void autolog_open(SERVER_REC *server, const char *server_tag,
log->colorizer = log_colorizer_strip;
log_item_add(log, LOG_ITEM_TARGET, target, server_tag);
- dir = g_dirname(log->real_fname);
+ dir = g_path_get_dirname(log->real_fname);
mkpath(dir, log_dir_create_mode);
g_free(dir);