History

Assure loose objects are actually not found when opening

Otherwise permission errors wouldn't be propagated.

Sebastian Thiel committed 5 years ago

Commit 7a4f2bf1 parent d8b26ce1 file · +1 −1Browse files

Unified · Split

git-odb/src/loose/db/locate.rs+1−1
@@ -39,7 +39,7 @@ impl Db { · 38 unmodified lines
3939 action,
4040 path,
4141 } => {
42− if action == Self::OPEN_ACTION {
42+ if action == Self::OPEN_ACTION && err.kind() == std::io::ErrorKind::NotFound {
4343 None
4444 } else {
4545 Some(Err(Error::Io {