From 67d5d2c434db7d6b85d438f263ca51c26715a583 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Sun, 4 Aug 2024 13:09:48 +1200 Subject: Set error flag when file device cannot ascend to parent directory This should have been happening previously, but was missed. --- src/devices/file.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/devices/file.rs b/src/devices/file.rs index 2a00a59..d53db0b 100644 --- a/src/devices/file.rs +++ b/src/devices/file.rs @@ -185,6 +185,8 @@ impl FileDevice { if let Some((_, path)) = &self.entry { if let Some(parent_path) = path.parent() { self.op_success = self.open_entry(&parent_path.to_owned()).is_ok(); + } else { + self.op_success = false; } } else { self.op_success = self.open_entry(&self.default_path.to_owned()).is_ok(); -- cgit v1.2.3-70-g09d2