Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b08e14b

Browse files
authoredJul 16, 2021
Retry rename on lock induced failures (re-fix) (#16461)
Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <[email protected]>
1 parent 6d8648c commit b08e14b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎modules/util/remove.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func Rename(oldpath, newpath string) error {
6464
if err == nil {
6565
break
6666
}
67-
unwrapped := err.(*os.PathError).Err
67+
unwrapped := err.(*os.LinkError).Err
6868
if unwrapped == syscall.EBUSY || unwrapped == syscall.ENOTEMPTY || unwrapped == syscall.EPERM || unwrapped == syscall.EMFILE || unwrapped == syscall.ENFILE {
6969
// try again
7070
<-time.After(100 * time.Millisecond)

0 commit comments

Comments
 (0)
Please sign in to comment.