From d4111b01462641baa21978a78390215987a5958a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 5 Jan 2011 16:44:31 -0800 Subject: fix for bug 6641 * change shell API to only use "edit level" when needed. * add factory functions for cstore creation to simplify code. (cherry picked from commit 2208bfef1004295d3227492c6a3e9d7b36903db5) --- src/cli_bin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/cli_bin.cpp') diff --git a/src/cli_bin.cpp b/src/cli_bin.cpp index 9528277..e8ff95a 100644 --- a/src/cli_bin.cpp +++ b/src/cli_bin.cpp @@ -15,13 +15,14 @@ */ #include +#include #include #include #include #include #include -#include +#include static int op_idx = -1; static const char *op_bin_name[] = { @@ -218,14 +219,15 @@ main(int argc, char **argv) } // actual CLI operations use the edit levels from environment, so pass true. - UnionfsCstore cstore(true); + Cstore *cstore = Cstore::createCstore(true); vector path_comps; for (int i = 1; i < argc; i++) { path_comps.push_back(argv[i]); } // call the op function - OpFunc[op_idx](cstore, path_comps); + OpFunc[op_idx](*cstore, path_comps); + delete cstore; exit(0); } -- cgit v1.2.3