Skip to content

Commit

Permalink
[FONC] Add WSLCTL env variable possibility for data storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu BOYAVAL committed Oct 14, 2024
1 parent 61546bf commit 88e7448
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Application/AppConfig.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Class AppConfig : JsonHashtableFile

if (-Not $this.ContainsKey("appData"))
{
$this.Add("appData", [FileUtils]::joinPath($env:LOCALAPPDATA, "Wslctl") )
if (($null -ne $env:WSLCTL) -And (Test-Path -Path $env:WSLCTL)) { $this.Add("appData", $env:WSLCTL); }
else {
$this.Add("appData", [FileUtils]::joinPath($env:LOCALAPPDATA, "Wslctl") )
}
}
}

Expand Down

0 comments on commit 88e7448

Please sign in to comment.