diff options
Diffstat (limited to 'cpp/src/IcePack/Server.cpp')
-rw-r--r-- | cpp/src/IcePack/Server.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/cpp/src/IcePack/Server.cpp b/cpp/src/IcePack/Server.cpp index 3ef27c001fc..16502266c9c 100644 --- a/cpp/src/IcePack/Server.cpp +++ b/cpp/src/IcePack/Server.cpp @@ -77,21 +77,30 @@ main(int argc, char* argv[]) return EXIT_FAILURE; } + PropertiesPtr defaultProperties; + try + { + defaultProperties = getDefaultProperties(argc, argv); + StringSeq args = argsToStringSeq(argc, argv); + args = defaultProperties->parseCommandLineOptions("IcePack", args); + stringSeqToArgs(args, argc, argv); + } + catch(const SystemException& ex) + { + cerr << argv[0] << ": " << ex << endl; + return EXIT_FAILURE; + } + // - // Get the data directory from the IcePack.Data property. + // Check that IcePack.Data property is set and creates + // subdirectories db and servers if they don't already exist. // - PropertiesPtr defaultProperties = getDefaultProperties(argc, argv); - StringSeq args = argsToStringSeq(argc, argv); - args = defaultProperties->parseCommandLineOptions("IcePack", args); - stringSeqToArgs(args, argc, argv); - string dataPath = defaultProperties->getProperty("IcePack.Data"); if(dataPath.empty()) { cerr << argv[0] << ": property `IcePack.Data' is not set" << endl; return EXIT_FAILURE; } - if(dataPath[dataPath.length() - 1] != '/') { dataPath += "/"; |