forgejo/modules/util
zeripath ca55e49cc0
Retry rename on lock induced failures (#16435) (#16439)
Backport #16435

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>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-07-15 22:57:51 +03:00
..
compare.go migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
copy.go migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
paginate.go [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
paginate_test.go [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
path.go Add StatDir and replace com.StatDir (#14099) 2020-12-22 07:40:57 +08:00
remove.go Retry rename on lock induced failures (#16435) (#16439) 2021-07-15 22:57:51 +03:00
sanitize.go Update golangci-lint to version 1.31.0 (#13102) 2020-10-11 21:27:20 +01:00
sanitize_test.go Sanitize credentials in mirror form (#9975) 2020-01-25 10:57:42 +00:00
shellquote.go Completely quote AppPath and CustomConf paths (#12955) 2020-09-28 21:16:52 -04:00
shellquote_test.go Completely quote AppPath and CustomConf paths (#12955) 2020-09-28 21:16:52 -04:00
timer.go Prevent timer leaks in Workerpool and others (#11333) 2020-05-08 16:46:05 +01:00
url.go Re-attempt to delete temporary upload if the file is locked by another process (#12447) 2020-08-11 21:05:34 +01:00
util.go Issue and Pulls lists rework (#13594) 2020-11-25 13:20:40 +02:00
util_test.go Re-attempt to delete temporary upload if the file is locked by another process (#12447) 2020-08-11 21:05:34 +01:00