Skip to content

Commit

Permalink
fix: Execute file tree generation when we generate the transfer locally
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Dec 12, 2024
1 parent f8d5969 commit cbb0bdf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@ class TransferController(private val realmProvider: RealmProvider) {
uploadSession: UploadSession,
transferStatus: TransferStatus,
) = runThrowingRealm {
val transferDB = TransferDB(linkUUID, uploadSession, transferStatus).apply {
container?.files?.let { files ->
FileUtils.getFileDBTree(containerUUID, files)
}
}

realm.write {
this.copyToRealm(TransferDB(linkUUID, uploadSession, transferStatus), UpdatePolicy.ALL)
this.copyToRealm(transferDB, UpdatePolicy.ALL)
}
}
//endregion
Expand Down

0 comments on commit cbb0bdf

Please sign in to comment.