From 889a112df277491586fdaf5dddffa51323068708 Mon Sep 17 00:00:00 2001 From: milleniumbug Date: Wed, 6 Apr 2016 20:41:21 +0200 Subject: [PATCH] added opening the file on using the "create new file here" option --- src/directories.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/directories.cc b/src/directories.cc index 0b019a6..9e7095f 100644 --- a/src/directories.cc +++ b/src/directories.cc @@ -309,7 +309,10 @@ Directories::Directories() : Gtk::TreeView(), stop_update_thread(false) { bool is_directory=boost::filesystem::is_directory(*source_path); auto target_path = (is_directory ? *source_path : source_path->parent_path())/content; if(!boost::filesystem::exists(target_path)) + { filesystem::write(target_path, ""); + Notebook::get().open(target_path); + } else Terminal::get().print("Cannot create "+target_path.string()+": file already exists.\n", true); update();