hughsie / passim

A local caching server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusing error message when trying to publish an item larger than MaxItemSize

mgerstner opened this issue · comments

When trying to publish a file larger than the configured MaxItemSize then the error message is confusing:

# grep MaxItemSize /etc/passim.conf
MaxItemSize = 1024
# dd if=/dev/random of=toolarge bs=1100 count=1
# passim publish toolarge
cannot read from fd: 0x44c > 0x400

It sounds like it is an I/O or logical error but it is actually a policy violation. End users will likely not understand that the configuration is to blame.

Verified this fix.