From 1507f2dff9d5a70c8c20bbda88c29e81ff70c211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 29 Sep 2020 02:31:49 +0200 Subject: [PATCH] Cleanup --- sdn.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdn.cpp b/sdn.cpp index e92303f..0003616 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -1100,10 +1100,9 @@ fun change_dir (const string &path) { return; } - auto old_cwd = g.cwd; - level last {g.offset, g.cursor, old_cwd, g.entries[g.cursor].filename}; + level last {g.offset, g.cursor, g.cwd, g.entries[g.cursor].filename}; g.cwd = full_path; - bool same_path = old_cwd == g.cwd; + bool same_path = last.path == g.cwd; reload (same_path); if (is_ancestor_dir (last.path, g.cwd)) {