Windows: Directory.rename deletes the source directory if it is a subdirectory of the target. #14219
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
os-windows
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
On Windows, Directory.rename deletes the target directory before copying the source directory to it. This means that .rename can't be used to replace a directory with one of its subdirectories, or with itself (which should be a no-op). I think we should fail in this case, with an informative exception, rather than deleting the target and then failing.
The text was updated successfully, but these errors were encountered: