-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-iotype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
When Link is created then FileSystemCreateEvent is fired with isDirectory property set to true. But Link is not a Directory, isDirectory should be false in this case. Example
import "dart:io";
import "dart:async";
main() async {
Directory sandbox = Directory.systemTemp.createTempSync();
Directory dir = new Directory(sandbox.path + Platform.pathSeparator + "dir");
dir.createSync();
File target = new File(sandbox.path + Platform.pathSeparator + "target");
target.createSync();
final eventCompleter = new Completer<FileSystemEvent>();
var subscription;
subscription = dir.watch().listen((FileSystemEvent event) {
eventCompleter.complete(event);
subscription.cancel();
});
Link link = new Link(dir.path + Platform.pathSeparator + "link");
link.createSync(target.path);
final event = await eventCompleter.future;
print(event);
print(event.isDirectory);
sandbox.deleteSync(recursive: true);
}Under Linux the code above produces
FileSystemCreateEvent('/tmp/HQLPTU/dir/link')
false
Tested on
Dart VM version: 2.1.0-dev.8.0 (Wed Oct 24 21:47:12 2018 +0200) on "windows_x64"
Dart VM version: 2.1.0-dev.9.2 (Unknown timestamp) on "linux_x64"
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-iotype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)