Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-server/pull/205#discussion_r238848689
  
    --- Diff: src/guacd/conf-args.c ---
    @@ -122,3 +128,15 @@ int guacd_conf_parse_args(guacd_config* config, int 
argc, char** argv) {
     
     }
     
    +const char* guacd_conf_get_path(int argc, char** argv) {
    +
    +    /* Find -c option */
    +    int i;
    +    for(i=1; i<argc-1; i++) {
    +        if(strcmp("-c", argv[i]) == 0) return argv[i+1];
    --- End diff --
    
    I really don't like the idea of ignoring `-c` initially and manually 
re-parsing the arguments later. There has to be a better way.
    
    What about parsing any file specified with `-c` immediately upon reading 
that `-c`? Arguments parsed before the file would be overridden by that file, 
while arguments which follow would override further. This would also open up 
the possibility of reading multiple files through specifying `-c` multiple 
times.


---

Reply via email to