]> arthur.barton.de Git - bup.git/commit - cmd/save-cmd.py
cmd/save: if file.read() returns an error, don't abort.
authorAvery Pennarun <apenwarr@gmail.com>
Sat, 16 Oct 2010 23:55:16 +0000 (17:55 -0600)
committerAvery Pennarun <apenwarr@gmail.com>
Sat, 16 Oct 2010 23:57:53 +0000 (17:57 -0600)
commit94cd96990c591608c6d521b184c17406f80403c2
treecc028f19fc3b866951e7481bf60e1488db1845e9
parent6bfe560d3e08df29d534ebcac7eda2a38c6e9a39
cmd/save: if file.read() returns an error, don't abort.

Apparently some mis-implemented Linux filesystems (selinuxfs) have regular
files that can be opened for read, but return EINVAL when you try to read
them.  We would throw a fatal exception in that case (since we're not
supposed to have read errors ever, and thus that implies something happened
that we didn't think of) but I guess we'd better make this into a non-fatal
error.  It still makes the exit code nonzero so you can see that something
didn't work, though.

Reported by Zoran Zaric.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/save-cmd.py