minor fixes;

v0.5.xx
Alexander Vdolainen 9 years ago
parent 58b606a50c
commit 90fad10039

@ -138,10 +138,10 @@ static int __remote_ls(FILE *fso, struct _remote_host *rh, const char *opts)
/* ok determine the lenght */ /* ok determine the lenght */
remote_rpc_len = strlen("dir-open") + 12*sizeof(char) + remote_rpc_len = strlen("dir-open") + 12*sizeof(char) +
(opts ? strlen ("./") : strlen(opts)); (opts ? strlen (opts) : strlen("./"));
if(!(remote_rpc = malloc(remote_rpc_len))) return ENOMEM; if(!(remote_rpc = malloc(remote_rpc_len))) return ENOMEM;
else remote_rpc_len = snprintf(remote_rpc, remote_rpc_len, else remote_rpc_len = snprintf(remote_rpc, remote_rpc_len,
"(dir-open \"%s\")", opts ? "./" : opts); "(dir-open \"%s\")", opts ? opts : "./");
/* firstly open the required channel with required type */ /* firstly open the required channel with required type */
if(!(rpc_channel = sxchannel_open(rh->link, READONLY_CHANNEL))) { if(!(rpc_channel = sxchannel_open(rh->link, READONLY_CHANNEL))) {

Loading…
Cancel
Save