From ff762fb499be220ccd680f3bf68dca44a902a5ff Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Dec 2008 16:10:17 +0000 Subject: * Pass HashType values instead of strings. --- src/libstore/remote-store.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index f79b22310b5b..d83d501ee20c 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -279,16 +279,16 @@ Path RemoteStore::queryDeriver(const Path & path) Path RemoteStore::addToStore(const Path & _srcPath, - bool recursive, string hashAlgo, PathFilter & filter) + bool recursive, HashType hashAlgo, PathFilter & filter) { Path srcPath(absPath(_srcPath)); writeInt(wopAddToStore, to); writeString(baseNameOf(srcPath), to); /* backwards compatibility hack */ - writeInt((hashAlgo == "sha256" && recursive) ? 0 : 1, to); + writeInt((hashAlgo == htSHA256 && recursive) ? 0 : 1, to); writeInt(recursive ? 1 : 0, to); - writeString(hashAlgo, to); + writeString(printHashType(hashAlgo), to); dumpPath(srcPath, to, filter); processStderr(); return readStorePath(from); -- cgit 1.4.1