summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-03 20:21:45 +0000
committerDavid Robillard <d@drobilla.net>2013-02-03 20:21:45 +0000
commit1002a5535843b303d2445bf4164d9275ab3b2389 (patch)
treebbec8bc9c7cf4ff43a663fce9e7c796491f619ad /src
parent6dc37f9db5c5c8c11a95f9498ce674202d018367 (diff)
downloadingen-1002a5535843b303d2445bf4164d9275ab3b2389.tar.gz
ingen-1002a5535843b303d2445bf4164d9275ab3b2389.tar.bz2
ingen-1002a5535843b303d2445bf4164d9275ab3b2389.zip
Don't ignore symlink() return value.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5043 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/serialisation/Serialiser.cpp11
1 files changed, 9 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#include <errno.h>
+#include <string.h>
+
#include <cassert>
#include <cstdlib>
#include <string>
@@ -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();
}