aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf/migration_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-18 14:51:39 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-23 15:29:18 +0200
commit65dee70f4b074e9171d131273045976cf6e9bdcf (patch)
tree430ef7b2e8695030b4a1a574d5759501cb89a0e0 /conf/migration_windows.go
parentglobal: use SECURITY_DESCRIPTOR apis from x/sys/windows (diff)
downloadwireguard-windows-65dee70f4b074e9171d131273045976cf6e9bdcf.tar.xz
wireguard-windows-65dee70f4b074e9171d131273045976cf6e9bdcf.zip
conf: do not create config folder and migrate if preset
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conf/migration_windows.go')
-rw-r--r--conf/migration_windows.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/conf/migration_windows.go b/conf/migration_windows.go
index d8d349f5..fb12eaf0 100644
--- a/conf/migration_windows.go
+++ b/conf/migration_windows.go
@@ -14,6 +14,10 @@ import (
)
func maybeMigrate(c string) {
+ if disableAutoMigration {
+ return
+ }
+
vol := filepath.VolumeName(c)
withoutVol := strings.TrimPrefix(c, vol)
oldRoot := filepath.Join(vol, "\\windows.old")