diff options
Diffstat (limited to 'src/cssh.c')
-rw-r--r-- | src/cssh.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1252,10 +1252,12 @@ SHELL_EOF: rc = mkdir( full_path, 0750 ); if( rc < 0 ) { - fprintf( stderr, "ERROR: failed to create base directory '%s' for host '%s': %s\n", - full_path, host[i], strerror( errno ) ); - cleanup_sessions( &session, NULL, &scp_data, host, port, nof_sessions, args_info.verbose_given > 0 ); - exit( EXIT_FAILURE ); + if( errno != EEXIST ) { + fprintf( stderr, "ERROR: failed to create base directory '%s' for host '%s': %s\n", + full_path, host[i], strerror( errno ) ); + cleanup_sessions( &session, NULL, &scp_data, host, port, nof_sessions, args_info.verbose_given > 0 ); + exit( EXIT_FAILURE ); + } } } else { scp_data[i].filename = pwd; |