mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
comic source page
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:venera/foundation/app.dart';
|
||||
import 'package:venera/foundation/history.dart';
|
||||
import 'package:venera/foundation/res.dart';
|
||||
import 'package:venera/utils/ext.dart';
|
||||
import 'package:venera/utils/io.dart';
|
||||
|
||||
import '../js_engine.dart';
|
||||
import '../log.dart';
|
||||
|
@@ -59,11 +59,11 @@ class ComicSourceParser {
|
||||
if(!fileName.endsWith("js")){
|
||||
fileName = "$fileName.js";
|
||||
}
|
||||
var file = File("${App.dataPath}/comic_source/$fileName");
|
||||
var file = File(FilePath.join(App.dataPath, "comic_source", fileName));
|
||||
if(file.existsSync()){
|
||||
int i = 0;
|
||||
while(file.existsSync()){
|
||||
file = File("${App.dataPath}/comic_source/$fileName($i).js");
|
||||
file = File(FilePath.join(App.dataPath, "comic_source", "${fileName.split('.').first}($i).js"));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user