commit | 45634d9c0c43892028a325af52b1ca2433a94163 | [log] [tgz] |
---|---|---|
author | Jonas Termansen <sortie@google.com> | Fri Mar 06 17:53:46 2020 +0100 |
committer | GitHub <noreply@github.com> | Fri Mar 06 08:53:46 2020 -0800 |
tree | 54b612895c28f73553c606ee12e3bb77e12c2da0 | |
parent | e3a922d9675457aaf01c43c32a86862eb7093d2f [diff] |
Check for FileSystemEntityType.notFound (#80) The Dart breaking change <https://github.com/dart-lang/sdk/issues/40706> will change the timestamps on the notFound object from null to the epoch timestamp.
diff --git a/lib/src/stat.dart b/lib/src/stat.dart index 6430d0b..fb157a5 100644 --- a/lib/src/stat.dart +++ b/lib/src/stat.dart
@@ -28,5 +28,6 @@ } final stat = await FileStat.stat(path); + if (stat.type == FileSystemEntityType.notFound) return null; return stat.modified; }