git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4648 77e5149b-7576-45b1-b177-96237e5ba77b
aCaB authored on 2009/01/25 00:51:44... | ... |
@@ -567,6 +567,9 @@ int client(const struct optstruct *opts, int *infected) |
567 | 567 |
|
568 | 568 |
if(scandash) { |
569 | 569 |
int sockd, ret; |
570 |
+ struct stat sb; |
|
571 |
+ fstat(0, &sb); |
|
572 |
+ if((sb.st_mode & S_IFMT) != S_IFREG) scantype = STREAM; |
|
570 | 573 |
if((sockd = dconnect()) >= 0 && (ret = dsresult(sockd, scantype, NULL)) >= 0) |
571 | 574 |
*infected = ret; |
572 | 575 |
else |