g_dirname and g_basename function are deprecated since glib-2.2.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-03-21 12:58:17 +03:00 committed by Slava Zanko
parent ff2f53119b
commit dbdc471553

View File

@ -115,17 +115,18 @@ lock_build_name (void)
static char *
lock_build_symlink_name (const vfs_path_t * fname_vpath)
{
const char *elpath, *str_filename;
char *str_dirname, *symlink_name;
const char *elpath;
char *str_filename, *str_dirname, *symlink_name;
/* get first path piece */
elpath = vfs_path_get_by_index (fname_vpath, 0)->path;
str_filename = g_basename (elpath);
str_dirname = g_dirname (elpath);
str_filename = g_path_get_basename (elpath);
str_dirname = g_path_get_dirname (elpath);
symlink_name = g_strconcat (str_dirname, PATH_SEP_STR ".#", str_filename, (char *) NULL);
g_free (str_dirname);
g_free (str_filename);
return symlink_name;
}