changeset 720:d8a88f279aca

Use expand_tilde() instead of simple concatenation, it allows correct expansion of ~user as well as ~dir.
author zas_
date Wed, 21 May 2008 09:50:32 +0000
parents ab4162fa9209
children b736a2e3129b
files src/ui_tabcomp.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui_tabcomp.c	Wed May 21 09:30:53 2008 +0000
+++ b/src/ui_tabcomp.c	Wed May 21 09:50:32 2008 +0000
@@ -152,7 +152,7 @@
 	if (text[0] == '~')
 		{
 		gchar *t = text;
-		text = g_strconcat(homedir(), t + 1, NULL);
+		text = expand_tilde(text);
 		g_free(t);
 		}
 
@@ -172,7 +172,7 @@
 	if (text[0] == '~')
 		{
 		gchar *t = text;
-		text = g_strconcat(homedir(), t + 1, NULL);
+		text = expand_tilde(text);
 		g_free(t);
 		}
 
@@ -361,7 +361,7 @@
 	/* home dir expansion */
 	if (entry_text[0] == '~')
 		{
-		entry_dir = g_strconcat(homedir(), entry_text + 1, NULL);
+		entry_dir = expand_tilde(entry_text);
 		home_exp = TRUE;
 		}
 	else