From d067e4a6471e99be4e10c8fc721dfd5361242d14 Mon Sep 17 00:00:00 2001 From: ali Date: Thu, 19 Nov 2026 12:22:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(wrapper):=20latest=20=E8=B7=B3=E8=BF=87=20?= =?UTF-8?q?=5Freports/Finish/=E9=9A=90=E8=97=8F=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/remote-common.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/remote-common.ps1 b/scripts/remote-common.ps1 index 8bc382a..d555fc2 100644 --- a/scripts/remote-common.ps1 +++ b/scripts/remote-common.ps1 @@ -59,9 +59,10 @@ function Test-IsPathLike([string]$Value) { function Resolve-RemoteTarget([string]$Name) { if ($Name -eq 'latest') { - $raw = (Invoke-RemoteQuery "find $script:QuarkDir -maxdepth 1 -mindepth 1 -type d -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2-") -join "`n" + # 取最近改动的目录;排除 _reports / Finish / 隐藏目录这类非下载目录 + $raw = (Invoke-RemoteQuery "find $script:QuarkDir -maxdepth 1 -mindepth 1 -type d -not -name '.*' -not -name '_*' -not -name Finish -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2-") -join "`n" $latest = $raw.Trim() - if (-not $latest) { throw "$script:QuarkDir 下没有任何子目录" } + if (-not $latest) { throw "$script:QuarkDir 下没有任何可处理目录" } return $latest }