aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/builtins/unpack-channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/builtins/unpack-channel.cc')
-rw-r--r--src/libstore/builtins/unpack-channel.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/builtins/unpack-channel.cc b/src/libstore/builtins/unpack-channel.cc
index 426d58a53..ba04bb16c 100644
--- a/src/libstore/builtins/unpack-channel.cc
+++ b/src/libstore/builtins/unpack-channel.cc
@@ -22,8 +22,7 @@ void builtinUnpackChannel(const BasicDerivation & drv)
auto entries = readDirectory(out);
if (entries.size() != 1)
throw Error("channel tarball '%s' contains more than one file", src);
- if (rename((out + "/" + entries[0].name).c_str(), (out + "/" + channelName).c_str()) == -1)
- throw SysError("renaming channel directory");
+ renameFile((out + "/" + entries[0].name), (out + "/" + channelName));
}
}