diff options
author | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2024-08-15 12:24:58 -0700 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2024-08-15 12:24:58 -0700 |
commit | cde873b4064360da01a9ffd92956e7d89e2c3eae (patch) | |
tree | 0ca4ea5d5e4270b87232a73e60646055527f06a0 /platform | |
parent | ee363af0ed65f6ca9a906f6065d0bd9c19dcf9e4 (diff) | |
download | redot-engine-cde873b4064360da01a9ffd92956e7d89e2c3eae.tar.gz |
Update the Android `fileLastModified` method to return values in seconds instead of milliseconds
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/io/file/FileData.kt | 2 | ||||
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/io/file/MediaStoreData.kt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileData.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileData.kt index f2c0577c21..d0b8a8dffa 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileData.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileData.kt @@ -53,7 +53,7 @@ internal class FileData(filePath: String, accessFlag: FileAccessFlags) : DataAcc fun fileLastModified(filepath: String): Long { return try { - File(filepath).lastModified() + File(filepath).lastModified() / 1000L } catch (e: SecurityException) { 0L } diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/MediaStoreData.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/MediaStoreData.kt index 5410eed727..146fc04da4 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/MediaStoreData.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/MediaStoreData.kt @@ -203,7 +203,7 @@ internal class MediaStoreData(context: Context, filePath: String, accessFlag: Fi } val dataItem = result[0] - return dataItem.dateModified.toLong() + return dataItem.dateModified.toLong() / 1000L } fun rename(context: Context, from: String, to: String): Boolean { |