Skip to content

Commit

Permalink
Fix import of backups containing trigger events
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed May 24, 2024
1 parent bd5db3e commit cd37414
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ internal abstract class ScenarioBackupDataSource<Backup, BackupScenario>(private

if (additionalFile.exists()) {
Log.d(TAG, "Additional file $fileName already exist, skip it.")
return false
return true
}

zipStream.readAndCopyEntryFile(additionalFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ internal class SmartBackupDataSource(
}

event.conditions.forEach { condition ->
if (condition.path == null || !File(appDataDir, condition.path!!).exists()) {
Log.w(TAG, "Invalid condition, ${condition.path} file does not exist.")
if (condition.type == ConditionType.ON_IMAGE_DETECTED && (
condition.path == null || !File(appDataDir, condition.path!!).exists())) {
Log.w(TAG, "Invalid screen condition, ${condition.path} file does not exist.")
return null
}
}
Expand Down

0 comments on commit cd37414

Please sign in to comment.