Browse Source

修正規則檔路徑錯誤

develop
pcnick 1 year ago
parent
commit
de3298579e
  1. 8
      Animelibk.ps1

8
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 "^\[(?<T>\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 {

Loading…
Cancel
Save