-
Previous Value Current Value Windows agent: job cleanup fails on read-only files (`.git` pack files) since upgrade to 16.8.4
Windows agent: job cleanup fails on read-only files (`.git` pack files)
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
16.8.4
|
| Labels |
No labels
|
Issue Votes (0)
Hello!
Since upgrading OneDev, jobs on our Windows agent fail at cleanup with:
The same jobs cleaned up fine before the upgrade.
Environment
Analysis
Remove-Item -Recurse -Forceon the same directory succeeds.work\.git\objects\pack\pack-*.pack/*.idx(job checkout)java.io.File.delete()(which handles read-only on Windows) tojava.nio.file.Files.delete()(which doesn't).Workaround
A final step with condition Always that runs:
Regards, Thomas