changeset 26896:9fa577cf9f4e

prevent unnamed editor tab from being closed by rmdir (bug #55888) * file-editor.cc (handle_dir_remove): do not check an editor tab with empty, i.e. invalid, filename
author Torsten Lilge <ttl-octave@mailbox.org>
date Wed, 13 Mar 2019 06:24:13 +0100
parents a1acd11bad19
children ba0c9e84f6a8
files libgui/src/m-editor/file-editor.cc
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Wed Mar 13 03:44:11 2019 +0100
+++ b/libgui/src/m-editor/file-editor.cc	Wed Mar 13 06:24:13 2019 +0100
@@ -2429,6 +2429,9 @@
     for (auto p = m_editor_tab_map.cbegin ();
          p != m_editor_tab_map.cend (); p++)
       {
+        if (p->first.isEmpty ())
+          continue;   // Nothing to do, no valid file name
+
         QString rel_path_to_file = old_dir.relativeFilePath (p->first);
         if (rel_path_to_file.left (3) != QString ("../"))
           {