mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
ipn/ipnserver paths: add paths.LegacyStateFilePath
Moving this information into a centralized place so that it is accessible to code in subsequent commits. Updates #3011 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
This commit is contained in:
@@ -148,3 +148,9 @@ func ensureStateDirPerms(dirPath string) error {
|
||||
return windows.SetNamedSecurityInfo(dirPath, windows.SE_FILE_OBJECT, flags,
|
||||
sids.User, sids.PrimaryGroup, dacl, nil)
|
||||
}
|
||||
|
||||
// LegacyStateFilePath returns the legacy path to the state file when it was stored under the
|
||||
// current user's %LocalAppData%.
|
||||
func LegacyStateFilePath() string {
|
||||
return filepath.Join(os.Getenv("LocalAppData"), "Tailscale", "server-state.conf")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user