mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 16:17:44 +00:00
don't try to back up directories matching the file name patterns
fixes #1653
This commit is contained in:
parent
20d4704090
commit
d951a1dbdd
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ fun BackupRestorePreference(setting: Setting) {
|
|||
val files = mutableListOf<File>()
|
||||
filesDir.walk().forEach { file ->
|
||||
val path = file.path.replace(filesPath, "")
|
||||
if (backupFilePatterns.any { path.matches(it) })
|
||||
if (file.isFile && backupFilePatterns.any { path.matches(it) })
|
||||
files.add(file)
|
||||
}
|
||||
val protectedFilesDir = DeviceProtectedUtils.getFilesDir(ctx)
|
||||
|
@ -75,7 +75,7 @@ fun BackupRestorePreference(setting: Setting) {
|
|||
val protectedFiles = mutableListOf<File>()
|
||||
protectedFilesDir.walk().forEach { file ->
|
||||
val path = file.path.replace(protectedFilesPath, "")
|
||||
if (backupFilePatterns.any { path.matches(it) })
|
||||
if (file.isFile && backupFilePatterns.any { path.matches(it) })
|
||||
protectedFiles.add(file)
|
||||
}
|
||||
val wait = CountDownLatch(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue