aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5585c1755..3b78d602f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4925,7 +4925,10 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
goto quit_urls;
}
infdopen=TRUE;
- uploadfilesize=fileinfo.st_size;
+
+ /* we ignore file size for char/block devices, sockets, etc. */
+ if(S_IFREG == (fileinfo.st_mode & S_IFMT))
+ uploadfilesize=fileinfo.st_size;
}
else if(uploadfile && stdin_upload(uploadfile)) {