* 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>
log.Critical("Unable to move repository %s/%s directory from %s back to correct place %s: %v",oldOwnerName,repo.Name,RepoPath(newOwnerName,repo.Name),RepoPath(oldOwnerName,repo.Name),err)
log.Critical("Unable to move wiki for repository %s/%s directory from %s back to correct place %s: %v",oldOwnerName,repo.Name,WikiPath(newOwnerName,repo.Name),WikiPath(oldOwnerName,repo.Name),err)
log.Critical("Unable to rollback directory change during failed username change from: %s to: %s. DB Error: %v. Filesystem Error: %v",oldUserName,newUserName,err,err2)
returnfmt.Errorf("failed to rollback directory change during failed username change from: %s to: %s. DB Error: %w. Filesystem Error: %v",oldUserName,newUserName,err,err2)