[Xfce4-commits] <gigolo:master> When manually expanding a tilde and no username is set for the connection, fallback to the local username

Enrico Tröger noreply at xfce.org
Mon Jan 3 00:10:02 CET 2011


Updating branch refs/heads/master
         to 065f3a6fd1b2d616abe4965cb0387769dc9c8dd0 (commit)
       from c65cba3d9498fabb38def3298c834c8fa14c9d49 (commit)

commit 065f3a6fd1b2d616abe4965cb0387769dc9c8dd0
Author: Enrico Tröger <enrico at xfce.org>
Date:   Fri Dec 31 00:57:34 2010 +0100

    When manually expanding a tilde and no username is set for the connection, fallback to the local username

 src/bookmark.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/bookmark.c b/src/bookmark.c
index 403d053..e552f91 100644
--- a/src/bookmark.c
+++ b/src/bookmark.c
@@ -441,8 +441,12 @@ gchar *gigolo_bookmark_get_folder_expanded(GigoloBookmark *bookmark)
 
 	folder = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->folder;
 	username = gigolo_bookmark_get_user(bookmark);
-	if (NZV(folder) && username && folder[0] == '~')
+	if (NZV(folder) && folder[0] == '~')
+	{
+		if (! username)
+			username = g_get_user_name();
 		result = g_strconcat("/home/", username, folder + 1, NULL);
+	}
 	else
 		result = g_strdup(folder);
 



More information about the Xfce4-commits mailing list