mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #95586 from m4gr3d/fix_last_modified_time_unit
Update the Android `fileLastModified` method to return values in seconds instead of milliseconds
This commit is contained in:
commit
a7598679cf
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user