Mercurial > octave
changeset 26928:3e6aa7c7bbbb stable
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 | 8295dfd22a02 |
children | aa9745a1114a |
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 Tue Mar 12 07:47:03 2019 +0000 +++ b/libgui/src/m-editor/file-editor.cc Wed Mar 13 06:24:13 2019 +0100 @@ -2416,6 +2416,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 ("../")) {