fix cbz export

This commit is contained in:
2024-11-24 12:53:06 +08:00
parent bf1930cea2
commit 2408096a7c
2 changed files with 4 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ abstract class CBZ {
} }
int i = 1; int i = 1;
for (var image in allImages) { for (var image in allImages) {
var src = File(image.replaceFirst('file://', '')); var src = openFilePlatform(image);
var width = allImages.length.toString().length; var width = allImages.length.toString().length;
var dstName = var dstName =
'${i.toString().padLeft(width, '0')}.${image.split('.').last}'; '${i.toString().padLeft(width, '0')}.${image.split('.').last}';

View File

@@ -324,6 +324,9 @@ Directory openDirectoryPlatform(String path) {
} }
File openFilePlatform(String path) { File openFilePlatform(String path) {
if(path.startsWith("file://")) {
path = path.substring(7);
}
if(App.isAndroid) { if(App.isAndroid) {
var f = AndroidFile.fromPathSync(path); var f = AndroidFile.fromPathSync(path);
if(f == null) { if(f == null) {