diff --git a/lib/super_logging.dart b/lib/super_logging.dart index 9ad721d..cbcd2f2 100644 --- a/lib/super_logging.dart +++ b/lib/super_logging.dart @@ -235,6 +235,7 @@ class _SuperLogging { try { DateTime date = config.dateFmt.parse(basename(file.path)); dates[file] = date; + files.add(file); } on FormatException {} } @@ -247,7 +248,9 @@ class _SuperLogging { List toDelete = files.sublist(0, extra); for (File file in toDelete) { - await file.delete(); + try { + await file.delete(); + } catch (ignore) {} } }