From 84d10d248e82818b4f1c48200f2c157473808905 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Jul 2017 13:00:41 +0200 Subject: [PATCH] Fix build --- src/libstore/download.cc | 4 ++-- src/libutil/util.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 1541ca2f..9407aa50 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -204,7 +204,7 @@ Path downloadFileCached(const string & url, bool unpack, string name) Path dataFile = cacheDir + "/" + urlHash + ".info"; Path fileLink = cacheDir + "/" + urlHash + "-file"; - PathLocks lock({fileLink}, fmt("waiting for lock on ‘%1%’...", fileLink)); + PathLocks lock({fileLink}, (format("waiting for lock on ‘%1%’...") % fileLink).str()); Path storePath; @@ -258,7 +258,7 @@ Path downloadFileCached(const string & url, bool unpack, string name) if (unpack) { Path unpackedLink = cacheDir + "/" + baseNameOf(storePath) + "-unpacked"; - PathLocks lock2({unpackedLink}, fmt("waiting for lock on ‘%1%’...", unpackedLink)); + PathLocks lock({unpackedLink}, (format("waiting for lock on ‘%1%’...") % unpackedLink).str()); Path unpackedStorePath; if (pathExists(unpackedLink)) { unpackedStorePath = readLink(unpackedLink); diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 62d8efa3..e406b848 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -432,7 +432,7 @@ void createSymlink(const Path & target, const Path & link) void replaceSymlink(const Path & target, const Path & link) { for (unsigned int n = 0; true; n++) { - Path tmp = canonPath(fmt("%s/.%d_%s", dirOf(link), n, baseNameOf(link))); + Path tmp = canonPath((format("%s/.%d_%s") % dirOf(link) % n % baseNameOf(link)).str()); try { createSymlink(target, tmp);