From 1500d2a1d27bdbfaf799931735f078c7cbaba3d1 Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 24 Nov 2024 13:12:06 +0800 Subject: [PATCH] fix getImages --- lib/foundation/local.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/foundation/local.dart b/lib/foundation/local.dart index 3482bab..41bc3a5 100644 --- a/lib/foundation/local.dart +++ b/lib/foundation/local.dart @@ -364,8 +364,9 @@ class LocalManager with ChangeNotifier { var files = []; await for (var entity in directory.list()) { if (entity is File) { - if (entity.absolute.path.replaceFirst(path, '').substring(1) == - comic.cover) { + // Do not exclude comic.cover, since it may be the first page of the chapter. + // A file with name starting with 'cover.' is not a comic page. + if (entity.name.startsWith('cover.')) { continue; } //Hidden file in some file system