diff options
author | David Robillard <d@drobilla.net> | 2007-03-30 20:53:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-03-30 20:53:10 +0000 |
commit | c27f759594a713c8c65ee6637aafa2d02b52bd8d (patch) | |
tree | 46e4d2a8266030f97802bc947686463eaaeac48d /src/libs/client/DeprecatedLoader.cpp | |
parent | 05ec343c42e99611ac1ff8c45b73a3e1dc4e0941 (diff) | |
download | ingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.tar.gz ingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.tar.bz2 ingen-c27f759594a713c8c65ee6637aafa2d02b52bd8d.zip |
Serialization fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@379 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/DeprecatedLoader.cpp')
-rw-r--r-- | src/libs/client/DeprecatedLoader.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp index baa03c93..bb0096e1 100644 --- a/src/libs/client/DeprecatedLoader.cpp +++ b/src/libs/client/DeprecatedLoader.cpp @@ -168,12 +168,12 @@ DeprecatedLoader::add_metadata(MetadataMap& data, string old_key, string value) * Returns the path of the newly created patch. */ string -DeprecatedLoader::load_patch(const Glib::ustring& filename, - const Path& parent_path, - string name, - size_t poly, - MetadataMap initial_data, - bool existing) +DeprecatedLoader::load_patch(const Glib::ustring& filename, + boost::optional<Path> parent_path, + string name, + size_t poly, + MetadataMap initial_data, + bool existing) { cerr << "[DeprecatedLoader] Loading patch " << filename << "" << endl; @@ -216,8 +216,10 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename, if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) { if (load_name) { assert(key != NULL); - if (parent_path != "") - path = Path(parent_path).base() + Path::nameify((char*)key); + if (parent_path) + path = Path(parent_path.get()).base() + Path::nameify((char*)key); + else + path = Path("/") + Path::nameify((char*)key); } } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphony"))) { if (load_poly) { |