diff options
Diffstat (limited to 'plugingui/rcgen.cc')
-rw-r--r-- | plugingui/rcgen.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugingui/rcgen.cc b/plugingui/rcgen.cc index a30f7b4..f4d7fe6 100644 --- a/plugingui/rcgen.cc +++ b/plugingui/rcgen.cc @@ -26,6 +26,7 @@ */ #include <stdio.h> #include <string> +#include <unistd.h> int main(int argc, char *argv[]) { @@ -36,6 +37,16 @@ int main(int argc, char *argv[]) printf("{\n"); int i = 1; + + if(argc > 2 && std::string(argv[1]) == "-d") + { + if(chdir(argv[2])) + { + return 1; + } + i += 2; + } + while(i < argc) { printf(" {\n \":%s\", ", argv[i]); |