wgconf/conf/path.go
Vincent Batts d5812860fc
conf: bring over changes from wireguard-windows#10
https://github.com/WireGuard/wireguard-windows/pull/10 don't appear to
be of interest, and now need big rebasing.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2021-04-21 07:05:50 -04:00

18 lines
547 B
Go

/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
*/
package conf
var cachedConfigFileDir string
var cachedRootDir string
var disableAutoMigration bool
// PresetRootDirectory causes RootDirectory() to not try any automatic deduction, and instead
// uses what's passed to it. This isn't used by wireguard-windows, but is useful for external
// consumers of our libraries who might want to do strange things.
func PresetRootDirectory(root string) {
cachedRootDir = root
disableAutoMigration = true
}