Commit 6f887c87 authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

Fixed bad usage of lsftp_dc_r_isdir in com_mv (didn't check for error

in return value).

Rev: src/sftp/commands.c:1.3
parent 50e8ffa3
......@@ -1543,7 +1543,12 @@ com_mv(const char *arg, const char *command)
j++;
if( j != i ) /* Not the last argument? */
{
if( 2 != i || lsftp_dc_r_isdir( dst ) ) /* More than one source and one destination => we should append src to dst/ */
/* More than one source and one destination => we should append src to dst/.
* Same goes if dst is a directory */
if( 2 != i ||
( lsftp_dc_r_isdir( dst ) > 0 )
)
{
char *tmp1 = lsftp_concat( dst, "/" );
char *tmp2 = NULL;
......
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