From 6baa2c442035fb06652a7fad9d51df1ce41c05f9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 8 Oct 2003 15:06:59 +0000 Subject: * Get rid of identifiers since they are redundant now. This greatly simplifies stuff. * The format of Nix expressions and the database schema changed because of this, so it's best to delete old Nix installations. --- src/archive.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/archive.cc') diff --git a/src/archive.cc b/src/archive.cc index 4a6211e00eda..9039ad7db43e 100644 --- a/src/archive.cc +++ b/src/archive.cc @@ -49,7 +49,7 @@ static void writeString(const string & s, DumpSink & sink) static void dump(const string & path, DumpSink & sink); -static void dumpEntries(const string & path, DumpSink & sink) +static void dumpEntries(const Path & path, DumpSink & sink) { DIR * dir = opendir(path.c_str()); if (!dir) throw SysError("opening directory " + path); @@ -82,7 +82,7 @@ static void dumpEntries(const string & path, DumpSink & sink) } -static void dumpContents(const string & path, unsigned int size, +static void dumpContents(const Path & path, unsigned int size, DumpSink & sink) { writeString("contents", sink); @@ -110,7 +110,7 @@ static void dumpContents(const string & path, unsigned int size, } -static void dump(const string & path, DumpSink & sink) +static void dump(const Path & path, DumpSink & sink) { struct stat st; if (lstat(path.c_str(), &st)) @@ -150,7 +150,7 @@ static void dump(const string & path, DumpSink & sink) } -void dumpPath(const string & path, DumpSink & sink) +void dumpPath(const Path & path, DumpSink & sink) { writeString(archiveVersion1, sink); dump(path, sink); @@ -207,10 +207,10 @@ static void skipGeneric(RestoreSource & source) } -static void restore(const string & path, RestoreSource & source); +static void restore(const Path & path, RestoreSource & source); -static void restoreEntry(const string & path, RestoreSource & source) +static void restoreEntry(const Path & path, RestoreSource & source) { string s, name; @@ -235,7 +235,7 @@ static void restoreEntry(const string & path, RestoreSource & source) } -static void restoreContents(int fd, const string & path, RestoreSource & source) +static void restoreContents(int fd, const Path & path, RestoreSource & source) { unsigned int size = readInt(source); unsigned int left = size; @@ -254,7 +254,7 @@ static void restoreContents(int fd, const string & path, RestoreSource & source) } -static void restore(const string & path, RestoreSource & source) +static void restore(const Path & path, RestoreSource & source) { string s; @@ -331,7 +331,7 @@ static void restore(const string & path, RestoreSource & source) } -void restorePath(const string & path, RestoreSource & source) +void restorePath(const Path & path, RestoreSource & source) { if (readString(source) != archiveVersion1) throw badArchive("expected Nix archive"); -- cgit 1.4.1