summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-09-04 13:47:08 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-09-04 13:47:08 +0200
commitd490379a0860b78882564610e87a726c69e7da24 (patch)
treed5313480b836ffd3f42bb15831e5f5b4e940f360
parent9f4a4db934fad71eb7cf33f9ccac9b3cf80d1a55 (diff)
The get command now takes uri-encoded filenames to handle spaces.
-rw-r--r--commands.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index 577bee6..fab8b18 100644
--- a/commands.c
+++ b/commands.c
@@ -200,9 +200,13 @@ static void commands_get(GSocketConnection *connection, const gchar *cmd, GError
}
}
+ gchar *localfile = g_uri_unescape_string(data[2], NULL);
+ gchar *remotefile = g_uri_unescape_string(data[4], NULL);
- server_get(server, data[1], data[2], data[4]);
+ server_get(server, data[1], localfile, remotefile);
+ g_free(localfile);
+ g_free(remotefile);
g_strfreev(data);
}