Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/com/nextcloud/client/jobs/ContactsBackupWork.kt
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ class ContactsBackupWork(
)
}

private fun expireFiles(daysToExpire: Int, backupFolderString: String, account: User) { // -1 disables expiration
private fun expireFiles(daysToExpire: Int, backupFolderString: String, user: User) { // -1 disables expiration
if (daysToExpire > -1) {
val storageManager = FileDataStorageManager(account.toPlatformAccount(),
val storageManager = FileDataStorageManager(user.toPlatformAccount(),
applicationContext.getContentResolver())
val backupFolder: OCFile = storageManager.getFileByPath(backupFolderString)
val cal = Calendar.getInstance()
Expand All @@ -183,7 +183,7 @@ class ContactsBackupWork(
// delete backups
val service = Intent(applicationContext, OperationsService::class.java)
service.action = OperationsService.ACTION_REMOVE
service.putExtra(OperationsService.EXTRA_ACCOUNT, account)
service.putExtra(OperationsService.EXTRA_ACCOUNT, user.toPlatformAccount())
service.putExtra(OperationsService.EXTRA_REMOTE_PATH, backup.remotePath)
service.putExtra(OperationsService.EXTRA_REMOVE_ONLY_LOCAL, false)
operationsServiceBinder!!.queueNewOperation(service)
Expand Down