From 27091d05ee3dcef93c011ecfd763d330590582de Mon Sep 17 00:00:00 2001 From: angel Date: Sun, 19 Apr 2020 18:21:02 +0200 Subject: [PATCH] DirectoryView: Don't push same path twice to history When opening a path, check if it's the current one before pushing it twice to the path history. --- Applications/FileManager/DirectoryView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Applications/FileManager/DirectoryView.cpp b/Applications/FileManager/DirectoryView.cpp index e52f6ce0bf..88bdf5eda1 100644 --- a/Applications/FileManager/DirectoryView.cpp +++ b/Applications/FileManager/DirectoryView.cpp @@ -206,6 +206,10 @@ void DirectoryView::add_path_to_history(const StringView& path) void DirectoryView::open(const StringView& path) { + if (model().root_path() == path) { + model().update(); + return; + } add_path_to_history(path); model().set_root_path(path); }