Directory.deleteRecursively fails if the directory contains symlinks #2646
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-duplicate
Closed in favor of an existing report
library-io
Reproduce:
$ cat temp.dart
import('dart:io');
main() => new Directory('foo').deleteRecursivelySync();
$ mkdir foo
$ cd foo
$ ln -s ../temp.dart whatever
$ cd ..
$ dart temp.dart
Error:
Unhandled exception:
DirectoryIOException: Deletion failed, path = foo (OS Error: Directory not empty, errno = 66)
0. Function: '[email protected]' url: 'dart:io' line:669 col:7
1. Function: '::main' url: 'file:///.../temp.dart' line:2 col:53
Expected Result:
I'd like it to delete the directory, but not step into those symlinks and delete what they point to. Just delete the symlink files themselves.
The text was updated successfully, but these errors were encountered: