1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

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
This commit is contained in:
Alexander Færøy 2009-02-10 20:45:27 +00:00 committed by ahf
parent 3e58d2cc92
commit 859d434c60
3 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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';

View File

@ -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);