mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +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);
|
if (cache.existsSync()) cache.deleteSync(recursive: true);
|
||||||
cache.createSync();
|
cache.createSync();
|
||||||
await extractArchive(file, cache);
|
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'));
|
var metaDataFile = File(FilePath.join(cache.path, 'metadata.json'));
|
||||||
ComicMetaData? metaData;
|
ComicMetaData? metaData;
|
||||||
if (metaDataFile.existsSync()) {
|
if (metaDataFile.existsSync()) {
|
||||||
|
Reference in New Issue
Block a user