mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Fix deleted comic sources will be restore after webdav sync.
This commit is contained in:
@@ -95,11 +95,13 @@ Future<void> importAppData(File file, [bool checkVersion = false]) async {
|
|||||||
}
|
}
|
||||||
var comicSourceDir = FilePath.join(cacheDirPath, "comic_source");
|
var comicSourceDir = FilePath.join(cacheDirPath, "comic_source");
|
||||||
if (Directory(comicSourceDir).existsSync()) {
|
if (Directory(comicSourceDir).existsSync()) {
|
||||||
|
Directory(FilePath.join(App.dataPath, "comic_source"))
|
||||||
|
.deleteIfExistsSync(recursive: true);
|
||||||
|
Directory(FilePath.join(App.dataPath, "comic_source")).createSync();
|
||||||
for (var file in Directory(comicSourceDir).listSync()) {
|
for (var file in Directory(comicSourceDir).listSync()) {
|
||||||
if (file is File) {
|
if (file is File) {
|
||||||
var targetFile =
|
var targetFile =
|
||||||
FilePath.join(App.dataPath, "comic_source", file.name);
|
FilePath.join(App.dataPath, "comic_source", file.name);
|
||||||
File(targetFile).deleteIfExistsSync();
|
|
||||||
await file.copy(targetFile);
|
await file.copy(targetFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user