mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: fix iOS delete NSCachesDirectory no permission
This commit is contained in:
@@ -137,7 +137,12 @@ class CacheManage {
|
||||
static Future clearLibraryCache() async {
|
||||
var appDocDir = await getTemporaryDirectory();
|
||||
if (appDocDir.existsSync()) {
|
||||
await appDocDir.delete(recursive: true);
|
||||
// await appDocDir.delete(recursive: true);
|
||||
final List<FileSystemEntity> children =
|
||||
appDocDir.listSync(recursive: false);
|
||||
for (final FileSystemEntity file in children) {
|
||||
await file.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user