]> Cypherpunks repositories - gostls13.git/commit
os: reject Rename("old", "new") where new is a directory
authorRuss Cox <rsc@golang.org>
Tue, 18 Oct 2016 16:34:19 +0000 (12:34 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 19 Oct 2016 01:21:05 +0000 (01:21 +0000)
commit321c312d8246dec6889f5fe334b6193c320baf0e
tree9ad19487e501d3b73c77f6179d19b6be30e2ee50
parent8fbfdad28145bfaad2fa2082336128944d5a3543
os: reject Rename("old", "new") where new is a directory

Unix rejects this when new is a non-empty directory.
Other systems reject this when new is a directory, empty or not.
Make Unix reject empty directory too.

Fixes #14527.

Change-Id: Ice24b8065264c91c22cba24aa73e142386c29c87
Reviewed-on: https://go-review.googlesource.com/31358
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/file_unix.go
src/os/os_test.go