summaryrefslogtreecommitdiffstats
path: root/src/ingen
diff options
context:
space:
mode:
Diffstat (limited to 'src/ingen')
-rw-r--r--src/ingen/main.cpp24
1 files changed, 14 insertions, 10 deletions
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<Path> data_path;
+ boost::optional<Path> data_path = Path("/");
boost::optional<Path> parent;
boost::optional<Symbol> 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;