Changeset 7650


Ignore:
Timestamp:
Jan 9, 2009, 7:16:52 PM (12 years ago)
Author:
charles
Message:

(trunk libT) fix getConfigDir() bug reported by wereHamster

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/cli.c

    r7602 r7650  
    4949static const char * finishCall   = NULL;
    5050static const char * announce     = NULL;
    51 static const char * configdir    = NULL;
    5251static const char * sourceFile   = NULL;
    5352static const char * comment      = NULL;
     
    273272    const int ind = tr_optind;
    274273
    275     while(( c = tr_getopt( getUsage( ), argc, argv, options, &optarg )))
    276         if( c == 'g' )
    277             configdir = optarg;
     274    while(( c = tr_getopt( getUsage( ), argc, argv, options, &optarg ))) {
     275        if( c == 'g' ) {
     276            configDir = optarg;
     277            break;
     278        }
     279    }
    278280
    279281    tr_optind = ind;
  • trunk/daemon/daemon.c

    r7556 r7650  
    157157    const int ind = tr_optind;
    158158
    159     while(( c = tr_getopt( getUsage( ), argc, argv, options, &optarg )))
    160         if( c == 'g' )
     159    while(( c = tr_getopt( getUsage( ), argc, argv, options, &optarg ))) {
     160        if( c == 'g' ) {
    161161            configDir = optarg;
     162            break;
     163        }
     164    }
    162165
    163166    tr_optind = ind;
Note: See TracChangeset for help on using the changeset viewer.