mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Merge pull request #36 from pete4abw/master
fix order of lrzip.conf search
This commit is contained in:
commit
f95bc63976
10
util.c
10
util.c
|
|
@ -187,11 +187,6 @@ bool read_config(rzip_control *control)
|
|||
fp = fopen("lrzip.conf", "r");
|
||||
if (fp)
|
||||
fprintf(control->msgout, "Using configuration file ./lrzip.conf\n");
|
||||
if (fp == NULL) {
|
||||
fp = fopen("/etc/lrzip/lrzip.conf", "r");
|
||||
if (fp)
|
||||
fprintf(control->msgout, "Using configuration file /etc/lrzip/lrzip.conf\n");
|
||||
}
|
||||
if (fp == NULL) {
|
||||
HOME=getenv("HOME");
|
||||
if (HOME) {
|
||||
|
|
@ -201,6 +196,11 @@ bool read_config(rzip_control *control)
|
|||
fprintf(control->msgout, "Using configuration file %s\n", homeconf);
|
||||
}
|
||||
}
|
||||
if (fp == NULL) {
|
||||
fp = fopen("/etc/lrzip/lrzip.conf", "r");
|
||||
if (fp)
|
||||
fprintf(control->msgout, "Using configuration file /etc/lrzip/lrzip.conf\n");
|
||||
}
|
||||
if (fp == NULL)
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue