Browse Source

added opening the file on using the "create new file here" option

merge-requests/365/head
milleniumbug 10 years ago
parent
commit
889a112df2
No known key found for this signature in database
GPG Key ID: E069867FCF5D84EA
  1. 3
      src/directories.cc

3
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();

Loading…
Cancel
Save