From c349af8e91937111579de7b5fc1e9e2b4807a7c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Dec 2008 04:38:18 +0000 Subject: Fix ingen -l (fix ticket #314). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1903 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/Engine.cpp | 3 +-- src/ingen/main.cpp | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index 49f6e10c..23316bdf 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -150,8 +150,7 @@ Engine::main() bool Engine::main_iteration() { - // Run the maid (garbage collector) - _post_processor->process(); + _post_processor->process(); _maid->cleanup(); return !_quit_flag; diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 94f20aef..f1f2aa1c 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -241,19 +241,23 @@ main(int argc, char** argv) /* Load a patch */ if (args.load_given && engine_interface) { - boost::optional data_path; + boost::optional data_path = Path("/"); boost::optional parent; boost::optional symbol; - const Glib::ustring path = (args.path_given ? args.path_arg : "/"); - if (Path::is_valid(path)) { - const Path p(path); - parent = p.parent(); - const string s = p.name(); - if (Symbol::is_valid(s)) - symbol = s; - } else { - cerr << "Invalid path: '" << path << endl; + if (args.path_given) { + const Glib::ustring path = args.path_arg; + if (Path::is_valid(path)) { + const Path p(path); + if (p != "/") { + parent = p.parent(); + const string s = p.name(); + if (Symbol::is_valid(s)) + symbol = s; + } + } else { + cerr << "Invalid path given: '" << path << endl; + } } bool found = false; -- cgit v1.2.1