about summary refs log tree commit diff
path: root/src/libutil/archive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/archive.cc')
-rw-r--r--src/libutil/archive.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc
index b19ff4bf99a1..ab4cd47351b3 100644
--- a/src/libutil/archive.cc
+++ b/src/libutil/archive.cc
@@ -319,8 +319,7 @@ struct RestoreSink : ParseSink
     void createSymlink(const Path & path, const string & target)
     {
         Path p = dstPath + path;
-        if (symlink(target.c_str(), p.c_str()) == -1)
-            throw SysError(format("creating symlink `%1%'") % p);
+        nix::createSymlink(target, p);
     }
 };