mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
the library must provide default values for main options
This commit is contained in:
parent
9d4713e2a3
commit
910fd6a687
@ -76,6 +76,9 @@ pmhandle_t *handle_new()
|
||||
handle->access = PM_ACCESS_RW;
|
||||
#endif
|
||||
|
||||
handle->dbpath = strdup(PM_DBPATH);
|
||||
handle->cachedir = strdup(PM_CACHEDIR);
|
||||
|
||||
return(handle);
|
||||
}
|
||||
|
||||
|
@ -148,12 +148,6 @@ int main(int argc, char *argv[])
|
||||
if(parseconfig(config->configfile, config) == -1) {
|
||||
cleanup(1);
|
||||
}
|
||||
if(config->dbpath == NULL) {
|
||||
config->dbpath = strdup(PM_DBPATH);
|
||||
}
|
||||
if(config->cachedir == NULL) {
|
||||
config->cachedir = strdup(PM_CACHEDIR);
|
||||
}
|
||||
|
||||
/* set library parameters */
|
||||
if(alpm_set_option(PM_OPT_LOGMASK, (long)config->debug) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user