Commit f281e24c authored by Matt Colyer's avatar Matt Colyer

Fix renaming files, it was missing the second NULL character.

parent 5564ba70
...@@ -446,7 +446,7 @@ int afc_rename_file(AFClient *client, const char *from, const char *to) { ...@@ -446,7 +446,7 @@ int afc_rename_file(AFClient *client, const char *from, const char *to) {
// Send command // Send command
memcpy(send, from, strlen(from)+1); memcpy(send, from, strlen(from)+1);
memcpy(send+strlen(from)+1, to, strlen(to)); memcpy(send+strlen(from)+1, to, strlen(to)+1);
client->afc_packet->entire_length = client->afc_packet->this_length = 0; client->afc_packet->entire_length = client->afc_packet->this_length = 0;
client->afc_packet->operation = AFC_RENAME; client->afc_packet->operation = AFC_RENAME;
bytes = dispatch_AFC_packet(client, send, strlen(to) + strlen(from) + 2); bytes = dispatch_AFC_packet(client, send, strlen(to) + strlen(from) + 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment