Bug: Directory.watch()
emits incorrect isDirectory
#55130
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
closed-as-intended
Closed as the reported issue is expected behavior
docs-api
library-io
P2
A bug or feature request we're likely to work on
triaged
Issue has been triaged by sub team
I've encountered a bug with the Directory.watch() function in Dart on Linux and Windows. When a directory is deleted, the function does emit a delete event as expected. However, the
event.isDirectory
property incorrectly returnsfalse
.Steps to Reproduce
Here's a simple Dart program that reproduces the issue:
When you run this program and delete a directory in the current working directory, the console output indicates that
event.isDirectory
isfalse
, which is not the expected behavior.Expected Behavior
When a directory is deleted, I expect the
event.isDirectory
property of the delete event to betrue
.Actual Behavior
The
event.isDirectory
property of the delete event isfalse
when a directory is deleted.Environment
Dart SDK Version:
3.3.0 (stable)
Operating System and version:
Ubuntu 22.04.3 LTS
,Windows 11 22H2
The text was updated successfully, but these errors were encountered: