Fix build

This commit is contained in:
Eelco Dolstra 2017-07-12 13:00:41 +02:00
parent 758a3044f1
commit 84d10d248e
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);