Skip to content

Commit

Permalink
fix cbz export
Browse files Browse the repository at this point in the history
  • Loading branch information
wgh136 committed Nov 24, 2024
1 parent bf1930c commit 2408096
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/cbz.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ abstract class CBZ {
}
int i = 1;
for (var image in allImages) {
var src = File(image.replaceFirst('file://', ''));
var src = openFilePlatform(image);
var width = allImages.length.toString().length;
var dstName =
'${i.toString().padLeft(width, '0')}.${image.split('.').last}';
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ Directory openDirectoryPlatform(String path) {
}

File openFilePlatform(String path) {
if(path.startsWith("file://")) {
path = path.substring(7);
}
if(App.isAndroid) {
var f = AndroidFile.fromPathSync(path);
if(f == null) {
Expand Down

0 comments on commit 2408096

Please sign in to comment.