mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-02 06:44:25 +02:00
fix: Do not delete files from post-fs-data.d
This commit is contained in:
parent
c7d975e612
commit
70a1086edf
@ -2,9 +2,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:root/root.dart';
|
import 'package:root/root.dart';
|
||||||
|
|
||||||
class RootAPI {
|
class RootAPI {
|
||||||
// TODO(aAbed): remove in the future, keep it for now during migration.
|
|
||||||
final String _postFsDataDirPath = '/data/adb/post-fs-data.d';
|
|
||||||
|
|
||||||
final String _revancedDirPath = '/data/adb/revanced';
|
final String _revancedDirPath = '/data/adb/revanced';
|
||||||
final String _serviceDDirPath = '/data/adb/service.d';
|
final String _serviceDDirPath = '/data/adb/service.d';
|
||||||
|
|
||||||
@ -99,18 +96,9 @@ class RootAPI {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(aAbed): remove in the future, keep it for now during migration.
|
|
||||||
Future<void> removeOrphanedFiles() async {
|
Future<void> removeOrphanedFiles() async {
|
||||||
await Root.exec(
|
await Root.exec(
|
||||||
cmd: '''
|
cmd: 'find $_revancedDirPath -type f -name original.apk -delete',
|
||||||
find $_revancedDirPath -type f -name original.apk -delete
|
|
||||||
for file in "$_serviceDDirPath"/*; do
|
|
||||||
filename=\$(basename "\$file")
|
|
||||||
if [ -f "$_postFsDataDirPath/\$filename" ]; then
|
|
||||||
rm "$_postFsDataDirPath/\$filename"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
''',
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user