diff options
-rw-r--r-- | cpp/src/IcePack/Client.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/Admin.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp index af13f9c42d7..83c06679c20 100644 --- a/cpp/src/IcePack/Client.cpp +++ b/cpp/src/IcePack/Client.cpp @@ -161,7 +161,7 @@ Client::run(int argc, char* argv[]) int status = EXIT_SUCCESS; - if(argc < 2) // No files given + if(args.empty()) // No files given { if(!commands.empty()) // Commands were given { diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 4ee82b9b5ed..4db529f4f61 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -188,9 +188,9 @@ Client::run(int argc, char* argv[]) } else // Process files given on the command line { - for(vector<string>::size_type idx = 1; idx < args.size(); ++idx) + for(vector<string>::size_type idx = 0; idx < args.size(); ++idx) { - ifstream test(argv[idx]); + ifstream test(args[idx]); if(!test) { cerr << appName() << ": can't open `" << args[idx] << "' for reading: " << strerror(errno) << endl; @@ -198,7 +198,7 @@ Client::run(int argc, char* argv[]) } test.close(); - string cmd = cpp + " " + argv[idx]; + string cmd = cpp + " " + args[idx]; #ifdef _WIN32 FILE* cppHandle = _popen(cmd.c_str(), "r"); #else |