mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-16 18:38:52 -07:00
Allow specifying absolute paths in -c command line option.
Closes #424.
This commit is contained in:
parent
d9a65631b9
commit
d2a0d03332
5
app.go
5
app.go
@ -213,7 +213,10 @@ func promptAndGetPassword(prompt string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func askUsernamePasswordIfPossible() error {
|
func askUsernamePasswordIfPossible() error {
|
||||||
configfile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
|
configfile := config.ourConfigFilename
|
||||||
|
if !filepath.IsAbs(configfile) {
|
||||||
|
configfile = filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
|
||||||
|
}
|
||||||
_, err := os.Stat(configfile)
|
_, err := os.Stat(configfile)
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
// do nothing, file exists
|
// do nothing, file exists
|
||||||
|
Loading…
Reference in New Issue
Block a user