add check for pipes to do_upload (#704)

* add check for pipes to do_upload

* add parentheses

* add pester tests to sftp

* use pester 3.4 assertions

* add debug

* temp build in debug

* temp build in debug

* revert building CI in debug

* remove pester test for changes; will test manually
This commit is contained in:
Tess Gauthier 2023-12-07 14:37:36 -05:00 committed by GitHub
parent 4cd3519fbf
commit 9f9fd0d09d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2048,7 +2048,11 @@ do_upload(struct sftp_conn *conn, const char *local_path,
close(local_fd);
return(-1);
}
#ifdef WINDOWS
if (!(S_ISREG(sb.st_mode) || (sb.st_mode & S_IFMT) == S_IFIFO)) {
#else
if (!S_ISREG(sb.st_mode)) {
#endif /* WINDOWS */
error("local \"%s\" is not a regular file", local_path);
close(local_fd);
return(-1);