@aiyiran/myclaw 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/wsl2.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/wsl2.js CHANGED
@@ -96,13 +96,14 @@ if ($userInput) {
96
96
  # 判断是否为单个盘符 (如 F, G, d)
97
97
  if ($userInput -match '^[a-zA-Z]$') {
98
98
  $drive = $userInput.ToUpper()
99
- Write-Host " 正在搜索 $drive:\\ 中的 ${fileName}..."
100
- $found = Get-ChildItem -Path "$drive:\\" -Filter '${fileName}' -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
99
+ $drivePath = $drive + ':'
100
+ Write-Host " 正在搜索 $drivePath 中的 ${fileName}..."
101
+ $found = Get-ChildItem -Path $drivePath -Filter '${fileName}' -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
101
102
  if ($found) {
102
103
  Write-Host " 找到: $($found.FullName)"
103
104
  $resolved = $found.FullName
104
105
  } else {
105
- Write-Host " 未在 $drive:\\ 中找到 ${fileName}"
106
+ Write-Host " 未在 $drivePath 中找到 ${fileName}"
106
107
  }
107
108
  } elseif (Test-Path $userInput -PathType Leaf) {
108
109
  # 直接就是文件路径(拖拽)