Skip to content

Commit 38f8da0

Browse files
committed
Fix directive.
1 parent f5c9367 commit 38f8da0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sftp.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
21202120
signal(SIGINT, SIG_IGN);
21212121

21222122
if (el == NULL) {
2123+
#ifdef WINDOWS
21232124
if (interactive) {
21242125
wchar_t wcmd[2048];
21252126
printf("sftp> ");
@@ -2140,6 +2141,15 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
21402141
break;
21412142
}
21422143
}
2144+
#else
2145+
if (interactive) {
2146+
printf("sftp> ");
2147+
if (fgets(cmd, sizeof(cmd), infile) == NULL) {
2148+
if (interactive)
2149+
printf("\n");
2150+
break;
2151+
}
2152+
#endif
21432153
if (!interactive) { /* Echo command */
21442154
printf("sftp> %s", cmd);
21452155
if (strlen(cmd) > 0 &&

0 commit comments

Comments
 (0)