]> arthur.barton.de Git - bup.git/commit
save/index/drecurse: correct handling for fifos and nonexistent paths.
authorAvery Pennarun <apenwarr@gmail.com>
Sun, 21 Mar 2010 05:47:24 +0000 (01:47 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 21 Mar 2010 05:50:22 +0000 (01:50 -0400)
commita408ebb98b3fbf7b766f93ee20456e830deef23e
treed04414b7270f69751b2bf26ad0c9120109d7b8b8
parent829118cdaad9ed029a3151287bb523eb3beded16
save/index/drecurse: correct handling for fifos and nonexistent paths.

When indexing a fifo, you can try to open it (for security reasons) but it
has to be O_NDELAY just in case the fifo doesn't have anyone on the other
end; otherwise indexing can freeze.

In index.reduce_paths(), we weren't reporting ENOENT for reasons I can no
longer remember, but I think they must have been wrong.  Obviously if
someone specifies a nonexistent path on the command line, we should barf
rather than silently not back it up.

Add some unit tests to catch both cases.
lib/bup/drecurse.py
lib/bup/index.py
t/test.sh