mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-26 06:05:52 -05:00
In absPath, skip empty paths.
This commit is contained in:
parent
328f6ea455
commit
c5a3d0b01c
@ -285,7 +285,7 @@ func main() {
|
|||||||
func absPath(path string) string {
|
func absPath(path string) string {
|
||||||
// If a relative path is provided, prefix it with the the directory where
|
// If a relative path is provided, prefix it with the the directory where
|
||||||
// the config file was found.
|
// the config file was found.
|
||||||
if !strings.HasPrefix(path, "/") {
|
if (path != "") && !strings.HasPrefix(path, "/") {
|
||||||
dir, _ := filepath.Split(viper.ConfigFileUsed())
|
dir, _ := filepath.Split(viper.ConfigFileUsed())
|
||||||
if dir != "" {
|
if dir != "" {
|
||||||
path = dir + "/" + path
|
path = dir + "/" + path
|
||||||
|
Loading…
Reference in New Issue
Block a user