summaryrefslogtreecommitdiff
path: root/src/devices/file_device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/file_device.rs')
-rw-r--r--src/devices/file_device.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/file_device.rs b/src/devices/file_device.rs
index 00a2f69..61966b1 100644
--- a/src/devices/file_device.rs
+++ b/src/devices/file_device.rs
@@ -81,7 +81,9 @@ impl FileDevice {
self.path_buffer.clear();
self.flush();
- if let Some((Entry::Directory(dir), path)) = std::mem::take(&mut self.entry) {
+ if let Some((Entry::Directory(mut dir), path)) = std::mem::take(&mut self.entry) {
+ // Prevent the selected child from persisting when loading from cache.
+ dir.deselect_child();
self.cached_dir = Some((Entry::Directory(dir), path));
}
}