Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Use alternative split char #205

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion widget/remote_panel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ namespace Widgets {
// Use ',' as array-element-separator instead of ';'.
config_file.set_list_separator (',');

string gname = "%s@%s@%i".printf(user, server_address, port);
string gname = "%s|%s|%i".printf(user, server_address, port);
config_file.set_string(gname, "Name", name);
config_file.set_string(gname, "GroupName", group_name);
config_file.set_string(gname, "Command", command);
Expand Down
6 changes: 5 additions & 1 deletion widget/remote_server_dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ namespace Widgets {

string[]? server_infos = null;
if (server_info != null) {
server_infos = server_info.split("@");
server_infos = server_info.split("|");
if (server_infos.length == 1) {
// old file format
server_infos = server_info.split("@");
}
}

box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
Expand Down
6 changes: 5 additions & 1 deletion widget/terminal.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,11 @@ namespace Widgets {
ssh_script_content = ssh_script_content.concat("%s\n".printf(line));
}

string[] server_infos = server_info.split("@");
string[] server_infos = server_info.split("|");
if (server_infos.length == 1) {
// old file format
server_infos = server_info.split("@");
}

string password = "";
if (server_info.length > 2) {
Expand Down