Skip to content

Commit

Permalink
Check for FileSystemEntityType.notFound (dart-lang/watcher#80)
Browse files Browse the repository at this point in the history
The Dart breaking change <dart-lang/sdk#40706>
will change the timestamps on the notFound object from null to the epoch
timestamp.
  • Loading branch information
sortie authored Mar 6, 2020
1 parent 680cc49 commit c1a1313
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/watcher/lib/src/stat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ Future<DateTime> modificationTime(String path) async {
}

final stat = await FileStat.stat(path);
if (stat.type == FileSystemEntityType.notFound) return null;
return stat.modified;
}

0 comments on commit c1a1313

Please sign in to comment.