diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-04T13·28+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-04T13·28+0000 |
commit | f5f0cf423fda5e030d9be6fd6500a1b06d3a60bc (patch) | |
tree | 1f61202f7b956cb704cfbeb51c39ba06cb9cb350 /src/libstore/store-api.cc | |
parent | 052b6fb1495cd606d35cd3eb1806f9fe0019e6ca (diff) |
* Refactoring.
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index fb86fc6abbb7..677c3ca3e909 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -137,12 +137,10 @@ boost::shared_ptr<StoreAPI> store; boost::shared_ptr<StoreAPI> openStore(bool reserveSpace) { - string mode = getEnv("NIX_REMOTE"); - if (mode == "") + if (getEnv("NIX_REMOTE") == "") return boost::shared_ptr<StoreAPI>(new LocalStore(reserveSpace)); - else if (mode == "slave") + else return boost::shared_ptr<StoreAPI>(new RemoteStore()); - else throw Error(format("invalid setting for NIX_REMOTE, `%1%'") % mode); } |