diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-08-04 13:09:48 +1200 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-08-04 13:09:48 +1200 |
commit | 67d5d2c434db7d6b85d438f263ca51c26715a583 (patch) | |
tree | 91e23a19f45aea99ecd4e692af731e57fc7440a5 /src | |
parent | b82ffe72b3f72b8fc5e42464319bab69973c097f (diff) | |
download | bedrock-pc-67d5d2c434db7d6b85d438f263ca51c26715a583.zip |
Set error flag when file device cannot ascend to parent directory
This should have been happening previously, but was missed.
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/file.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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(); |