ref: 444266d24fb98ffd664d4db68c80dbf0fc8be85a
parent: c282f4b3320cdf1360205082d3556e73754aaa71
author: robs <robs>
date: Wed Sep 9 14:47:01 EDT 2009
Fix mistaken file size with pipe input on Windows
--- a/src/formats_i.c
+++ b/src/formats_i.c
@@ -143,7 +143,7 @@
struct stat st;
int ret = fstat(fileno(ft->fp), &st);
- return ret? 0 : (size_t)st.st_size;
+ return (!ret && (st.st_mode & S_IFREG))? (size_t)st.st_size : 0;
}
int lsx_flush(sox_format_t * ft)