mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
dump(): Use emplace()
This commit is contained in:
parent
e1a0359b59
commit
fcddaa4b9b
1 changed files with 2 additions and 3 deletions
|
@ -93,13 +93,12 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter)
|
||||||
debug(format("removing case hack suffix from '%1%'") % (path + "/" + i.name));
|
debug(format("removing case hack suffix from '%1%'") % (path + "/" + i.name));
|
||||||
name.erase(pos);
|
name.erase(pos);
|
||||||
}
|
}
|
||||||
if (unhacked.find(name) != unhacked.end())
|
if (!unhacked.emplace(name, i.name).second)
|
||||||
throw Error("file name collision in between '%1%' and '%2%'",
|
throw Error("file name collision in between '%1%' and '%2%'",
|
||||||
(path + "/" + unhacked[name]),
|
(path + "/" + unhacked[name]),
|
||||||
(path + "/" + i.name));
|
(path + "/" + i.name));
|
||||||
unhacked[name] = i.name;
|
|
||||||
} else
|
} else
|
||||||
unhacked[i.name] = i.name;
|
unhacked.emplace(i.name, i.name);
|
||||||
|
|
||||||
for (auto & i : unhacked)
|
for (auto & i : unhacked)
|
||||||
if (filter(path + "/" + i.first)) {
|
if (filter(path + "/" + i.first)) {
|
||||||
|
|
Loading…
Reference in a new issue