diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-28 08:22:03 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-30 08:47:21 -0600 |
commit | 431f812450f93090967b23c633446fc618a44118 (patch) | |
tree | 2d57da00c22f339369ccf6eeb8dd4c3dd406116c /conf | |
parent | manager: clean stale adapters on startup (diff) | |
download | wireguard-windows-431f812450f93090967b23c633446fc618a44118.tar.xz wireguard-windows-431f812450f93090967b23c633446fc618a44118.zip |
manager: fix nits in adapter cleanup logic and also handle ‘%s’ uniformly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conf')
-rw-r--r-- | conf/migration_windows.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/conf/migration_windows.go b/conf/migration_windows.go index 9c070a08..4b7ffe30 100644 --- a/conf/migration_windows.go +++ b/conf/migration_windows.go @@ -38,27 +38,27 @@ func maybeMigrate(c string) { return } if err != nil { - log.Printf("Not migrating configuration from '%s' due to GetFileSecurity error: %v", oldRoot, err) + log.Printf("Not migrating configuration from ‘%s’ due to GetFileSecurity error: %v", oldRoot, err) return } var defaulted bool var sid *windows.SID err = getSecurityDescriptorOwner(&sd[0], &sid, &defaulted) if err != nil { - log.Printf("Not migrating configuration from '%s' due to GetSecurityDescriptorOwner error: %v", oldRoot, err) + log.Printf("Not migrating configuration from ‘%s’ due to GetSecurityDescriptorOwner error: %v", oldRoot, err) return } if defaulted || !sid.IsWellKnown(windows.WinLocalSystemSid) { sidStr, _ := sid.String() - log.Printf("Not migrating configuration from '%s', as it is not explicitly owned by SYSTEM, but rather '%s'", oldRoot, sidStr) + log.Printf("Not migrating configuration from ‘%s’, as it is not explicitly owned by SYSTEM, but rather ‘%s’", oldRoot, sidStr) return } err = windows.MoveFileEx(windows.StringToUTF16Ptr(oldC), windows.StringToUTF16Ptr(c), windows.MOVEFILE_COPY_ALLOWED) if err != nil { if err != windows.ERROR_FILE_NOT_FOUND && err != windows.ERROR_ALREADY_EXISTS { - log.Printf("Not migrating configuration from '%s' due to error when moving files: %v", oldRoot, err) + log.Printf("Not migrating configuration from ‘%s’ due to error when moving files: %v", oldRoot, err) } return } - log.Printf("Migrated configuration from '%s'", oldRoot) + log.Printf("Migrated configuration from ‘%s’", oldRoot) } |