Skip to content

Commit 4dbcdb8

Browse files
Fixed nullable last modified date for OneDrive
1 parent cd22b4b commit 4dbcdb8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

data/src/apiKey/java/org/cryptomator/data/cloud/onedrive/OnedriveCloudNodeFactory.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ internal object OnedriveCloudNodeFactory {
7474
}
7575

7676
private fun lastModified(item: DriveItem): Date? {
77-
return item.fileSystemInfo?.let {
78-
return Date.from(it.lastModifiedDateTime?.toInstant())
79-
}
77+
return item.fileSystemInfo?.lastModifiedDateTime?.let { clientDate -> Date.from(clientDate.toInstant()) }
78+
?: item.lastModifiedDateTime?.let { serverDate -> Date.from(serverDate.toInstant()) }
8079
}
8180
}

0 commit comments

Comments
 (0)