Updating branch refs/heads/master to aff81c5c36e233d58671663634f35f03fc76b22c (commit) from 78c0bf1f89da169a3aa6c8999d002fc216870957 (commit)
commit aff81c5c36e233d58671663634f35f03fc76b22c Author: Enrico Tröger <enr...@xfce.org> Date: Sun Apr 22 21:58:59 2012 +0200 Properly skip leading slashes when validating path and share fields src/bookmarkeditdialog.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bookmarkeditdialog.c b/src/bookmarkeditdialog.c index 3158606..16b1cf4 100644 --- a/src/bookmarkeditdialog.c +++ b/src/bookmarkeditdialog.c @@ -294,7 +294,9 @@ gint gigolo_bookmark_edit_dialog_run(GigoloBookmarkEditDialog *dialog) tmp = gtk_entry_get_text(GTK_ENTRY(priv->path_entry)); if (tmp[0] == '/') { /* remove leading slashes */ - gtk_entry_set_text(GTK_ENTRY(priv->path_entry), tmp + 1); + gchar *path = g_strdup(tmp); + gtk_entry_set_text(GTK_ENTRY(priv->path_entry), path + 1); + g_free(path); } } if (! error && gtk_widget_get_parent(priv->share_entry) != NULL) @@ -302,7 +304,9 @@ gint gigolo_bookmark_edit_dialog_run(GigoloBookmarkEditDialog *dialog) tmp = gtk_entry_get_text(GTK_ENTRY(priv->share_entry)); if (tmp[0] == '/') { /* remove leading slashes */ - gtk_entry_set_text(GTK_ENTRY(priv->share_entry), tmp + 1); + gchar *share = g_strdup(tmp); + gtk_entry_set_text(GTK_ENTRY(priv->share_entry), share + 1); + g_free(share); } } if (! error) _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits