From de3298579e60fff29700b025b2328f8cf04efbaa Mon Sep 17 00:00:00 2001 From: pcnick Date: Mon, 9 Oct 2023 12:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=A6=8F=E5=89=87=E6=AA=94?= =?UTF-8?q?=E8=B7=AF=E5=BE=91=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Animelibk.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Animelibk.ps1 b/Animelibk.ps1 index 5026623..1dd3911 100644 --- a/Animelibk.ps1 +++ b/Animelibk.ps1 @@ -35,8 +35,8 @@ $RegexpSet = { } if ($VarConfig) { - if (Test-Path $VarConfig) { - $T = Get-Content -Encoding UTF8 $VarConfig | % { $H = @{} ; $S = $null} { + if (Test-Path $PSScriptRoot\$VarConfig) { + $T = Get-Content -Encoding UTF8 $PSScriptRoot\$VarConfig | % { $H = @{} ; $S = $null} { if ($_ -match "^\[(?\w*)\]" ) { $S = $Matches["T"] $H.add($S, @()) @@ -47,8 +47,8 @@ if ($VarConfig) { $T.GetEnumerator() | % { Set-Variable -Name $_.name -Value $_.value} } else { &$RegexpSet - $EpisodeRegex | % {"[EpisodeRegex]"}{ """$_""" }{""} | Out-File -Encoding UTF8 $VarConfig - $NameRegex | % {"[NameRegex]"}{ """$_""" } | Out-File -Encoding UTF8 -Append $VarConfig + $EpisodeRegex | % {"[EpisodeRegex]"}{ """$_""" }{""} | Out-File -Encoding UTF8 $PSScriptRoot\$VarConfig + $NameRegex | % {"[NameRegex]"}{ """$_""" } | Out-File -Encoding UTF8 -Append $PSScriptRoot\$VarConfig } } else {