# HG changeset patch # User Tom Fredrik Blenning Klaussen # Date 1381407234 -7200 # Node ID c17475848bf4ba2a8986c38c6dfc77bde4f9638d # Parent f507a7240bc9f11009a9672b607c1edbae921f68 Allow for paths to be specified on commandline. diff -r f507a7240bc9 -r c17475848bf4 Apps/updateDeDupe.cpp --- a/Apps/updateDeDupe.cpp Thu Oct 10 14:13:01 2013 +0200 +++ b/Apps/updateDeDupe.cpp Thu Oct 10 14:13:54 2013 +0200 @@ -3,11 +3,28 @@ #include "Exception/Exception.hpp" #include +#include +#include int main(int argc, char *argv[]) { + QStringList paths; + + for (int i = 1; i < argc; ++i) { + char path_buf[PATH_MAX]; + realpath(argv[i], path_buf); + paths.push_back(path_buf); + } + try { - DataController dc(false); + if (paths.empty()) { + DataController dc(false); + } + else { + foreach(const QString& path, paths) { + DataController dc(path, false); + } + } } catch (Exception& e) { std::cerr << "Unrecoverable error: " << e.toString().toStdString();