From 1002a5535843b303d2445bf4164d9275ab3b2389 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Feb 2013 20:21:45 +0000 Subject: Don't ignore symlink() return value. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5043 a436a847-0d15-0410-975c-d299462d15a1 --- src/serialisation/Serialiser.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/serialisation') diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 5ff672e0..d0052b81 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -14,6 +14,9 @@ along with Ingen. If not, see . */ +#include +#include + #include #include #include @@ -151,8 +154,12 @@ Serialiser::Impl::write_manifest(const std::string& bundle_path, Sord::URI(world, uris.lv2_binary), Sord::URI(world, binary_path, _base_uri)); - symlink(Glib::Module::build_path(INGEN_BUNDLE_DIR, "ingen_lv2").c_str(), - Glib::Module::build_path(bundle_path, "ingen_lv2").c_str()); + std::string lib(Glib::Module::build_path(INGEN_BUNDLE_DIR, "ingen_lv2")); + std::string link(Glib::Module::build_path(bundle_path, "ingen_lv2")); + if (symlink(lib.c_str(), link.c_str())) { + _world.log().error(Raul::fmt("Error creating link %1% => %2% (%3%\n") + % lib % link % strerror(errno)); + } finish(); } -- cgit v1.2.1