Initial commit
This commit is contained in:
22
openclaw-backend/fix_imports2_utf8.ps1
Normal file
22
openclaw-backend/fix_imports2_utf8.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
$base = "c:\Users\UI\Desktop\数字员工\openclaw-backend\openclaw-backend\src\main\java\com\openclaw\module"
|
||||
$modules = @("user","skill","order","points","payment","invite")
|
||||
$count = 0
|
||||
|
||||
foreach ($mod in $modules) {
|
||||
$modDir = Join-Path $base $mod
|
||||
if (-not (Test-Path $modDir)) { continue }
|
||||
Get-ChildItem -Path $modDir -Recurse -Filter "*.java" | ForEach-Object {
|
||||
$file = $_.FullName
|
||||
$content = Get-Content $file -Raw -Encoding UTF8
|
||||
$original = $content
|
||||
# Fix broken C: references - replace with correct module name
|
||||
$content = $content.Replace("com.openclaw.module.C:.", "com.openclaw.module.$mod.")
|
||||
if ($content -ne $original) {
|
||||
[System.IO.File]::WriteAllText($file, $content, [System.Text.UTF8Encoding]::new($false))
|
||||
$count++
|
||||
$fname = $_.Name
|
||||
Write-Host "Fixed C: in $mod\$fname"
|
||||
}
|
||||
}
|
||||
}
|
||||
Write-Host "`nFixed $count files with C: path issue."
|
||||
Reference in New Issue
Block a user