* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479)
Fix#16427 (again!)
* handle sharing violation error code
Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport #16461
Unfortunately #16435 asserts the wrong error and should use
os.LinkError not os.PathError.
Fix#16439
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Retry rename on lock induced failures
Due to external locking on Windows it is possible for an
os.Rename to fail if the files or directories are being
used elsewhere.
This PR simply suggests retrying the rename again similar
to how we handle the os.Remove problems.
Fix#16427
Signed-off-by: Andrew Thornton <art27@cantab.net>
* resolve CI fail
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util.
Fix#12339
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>