mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Improve importing comic: If the archive has only one directory, set working dir as it.
This commit is contained in:
@@ -85,6 +85,10 @@ abstract class CBZ {
|
||||
if (cache.existsSync()) cache.deleteSync(recursive: true);
|
||||
cache.createSync();
|
||||
await extractArchive(file, cache);
|
||||
var f = cache.listSync();
|
||||
if (f.length == 1 && f.first is Directory) {
|
||||
cache = f.first as Directory;
|
||||
}
|
||||
var metaDataFile = File(FilePath.join(cache.path, 'metadata.json'));
|
||||
ComicMetaData? metaData;
|
||||
if (metaDataFile.existsSync()) {
|
||||
|
Reference in New Issue
Block a user