linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #03032
[Branch ~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n] Rev 414: Fix saving of file paths
------------------------------------------------------------
revno: 414
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: linuxdcpp-i18n
timestamp: Sun 2011-01-16 16:49:56 -0600
message:
Fix saving of file paths
modified:
linux/settingsdialog.cc
--
lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n
Your team LinuxDC++ Team is subscribed to branch lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n/+edit-subscription
=== modified file 'linux/settingsdialog.cc'
--- linux/settingsdialog.cc 2010-12-10 05:50:31 +0000
+++ linux/settingsdialog.cc 2011-01-16 22:49:56 +0000
@@ -334,6 +334,13 @@
gchar *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fileChooser));
if (path)
{
+ if (!g_str_has_suffix(path, G_DIR_SEPARATOR_S))
+ {
+ gchar *tmp = g_strconcat(path, G_DIR_SEPARATOR_S, NULL);
+ g_free(path);
+ path = tmp;
+ }
+
SettingsManager::getInstance()->set(setting, path);
g_free(path);
}