aboutsummaryrefslogtreecommitdiff
path: root/nix/libutil/archive.cc
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
commitcf6db76d2af2f287f12928df160447ab4165b3e5 (patch)
tree49a1309c0e04c00090ab106f7ae3495a6da328c1 /nix/libutil/archive.cc
parente65b2181e8b436278e3dd0b405602a400fbd0a75 (diff)
parenta6798218bea0d6b2df598042d1ced29f74bb4250 (diff)
downloadpatches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar
patches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libutil/archive.cc')
-rw-r--r--nix/libutil/archive.cc31
1 files changed, 1 insertions, 30 deletions
diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc
index 4e3d99356a..2599030454 100644
--- a/nix/libutil/archive.cc
+++ b/nix/libutil/archive.cc
@@ -21,14 +21,6 @@
namespace nix {
-
-bool useCaseHack =
-#if __APPLE__
- true;
-#else
- false;
-#endif
-
static string archiveVersion1 = "nix-archive-1";
static string caseHackSuffix = "~nix~case~hack~";
@@ -85,19 +77,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter)
the case hack applied by restorePath(). */
std::map<string, string> unhacked;
for (auto & i : readDirectory(path))
- if (useCaseHack) {
- string name(i.name);
- size_t pos = i.name.find(caseHackSuffix);
- if (pos != string::npos) {
- printMsg(lvlDebug, format("removing case hack suffix from `%1%'") % (path + "/" + i.name));
- name.erase(pos);
- }
- if (unhacked.find(name) != unhacked.end())
- throw Error(format("file name collision in between `%1%' and `%2%'")
- % (path + "/" + unhacked[name]) % (path + "/" + i.name));
- unhacked[name] = i.name;
- } else
- unhacked[i.name] = i.name;
+ unhacked[i.name] = i.name;
for (auto & i : unhacked)
if (filter(path + "/" + i.first)) {
@@ -251,15 +231,6 @@ static void parse(ParseSink & sink, Source & source, const Path & path)
if (name <= prevName)
throw Error("NAR directory is not sorted");
prevName = name;
- if (useCaseHack) {
- auto i = names.find(name);
- if (i != names.end()) {
- printMsg(lvlDebug, format("case collision between `%1%' and `%2%'") % i->first % name);
- name += caseHackSuffix;
- name += std::to_string(++i->second);
- } else
- names[name] = 0;
- }
} else if (s == "node") {
if (s.empty()) throw badArchive("entry name missing");
parse(sink, source, path + "/" + name);