summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-19 20:35:35 +0000
committerDavid Robillard <d@drobilla.net>2008-08-19 20:35:35 +0000
commitfcc7d4c4d708bce9976739d45a3f2bc535dcff33 (patch)
tree9f5c578c9e87cfa362b7f11d89f6022fc7a030fa /src
parent174bd3e0314785a1a885877a9efe7a7eef31e0fa (diff)
downloadingen-fcc7d4c4d708bce9976739d45a3f2bc535dcff33.tar.gz
ingen-fcc7d4c4d708bce9976739d45a3f2bc535dcff33.tar.bz2
ingen-fcc7d4c4d708bce9976739d45a3f2bc535dcff33.zip
Fix loading nested patches.
git-svn-id: http://svn.drobilla.net/lad/ingen@1449 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/serialisation/Parser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/serialisation/Parser.cpp b/src/libs/serialisation/Parser.cpp
index 79c69648..8e158d05 100644
--- a/src/libs/serialisation/Parser.cpp
+++ b/src/libs/serialisation/Parser.cpp
@@ -219,8 +219,11 @@ Parser::parse_patch(
patch_poly = poly_param->second.get_int32();
}
- const Glib::ustring subject = ((object_uri[0] == '<')
+ Glib::ustring subject = ((object_uri[0] == '<')
? object_uri : Glib::ustring("<") + object_uri + ">");
+
+ if (subject[0] == '<' && subject[1] == '/')
+ subject = string("<").append(subject.substr(2));
//cout << "**** LOADING PATCH URI " << object_uri << ", SUBJ " << subject
// << ", ENG BASE " << engine_base << endl;
@@ -252,6 +255,8 @@ Parser::parse_patch(
patch_path = Path(engine_base + symbol);
else if (Path::is_valid(engine_base))
patch_path = (Path)engine_base;
+ else if (Path::is_valid(string("/").append(engine_base)))
+ patch_path = (Path)(string("/").append(engine_base));
else
cerr << "WARNING: Illegal engine base path '" << engine_base << "', loading patch to root" << endl;