Browse Source

Merge pull request #111 from eidheim/master

Fixed file paths for MSYS2 on new file and open actions
merge-requests/365/head
Ole Christian Eidheim 10 years ago
parent
commit
81599d2a9c
  1. 3
      src/juci.cc
  2. 4
      src/window.cc

3
src/juci.cc

@ -30,8 +30,7 @@ int Application::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>
boost::system::error_code ec;
auto new_p=boost::filesystem::canonical(parent_p, ec);
if(!ec && boost::filesystem::is_directory(new_p)) {
new_p+="/";
new_p+=p.filename();
new_p/=p.filename();
files.emplace_back(new_p);
}
else

4
src/window.cc

@ -164,7 +164,7 @@ void Window::set_menu_actions() {
if(filesystem::write(path)) {
if(Directories::get().current_path!="")
Directories::get().update();
notebook.open(path.string());
notebook.open(boost::filesystem::canonical(path));
Terminal::get().print("New file "+path.string()+" created.\n");
}
else
@ -223,7 +223,7 @@ void Window::set_menu_actions() {
menu.add_action("open_file", [this]() {
auto path=Dialog::open_file();
if(path!="")
notebook.open(path);
notebook.open(boost::filesystem::canonical(path));
});
menu.add_action("open_folder", [this]() {
auto path = Dialog::open_folder();

Loading…
Cancel
Save