ftp: Return current time for prefixes/directories (#19519)

This commit is contained in:
Klaus Post 2024-04-16 17:35:55 -07:00 committed by GitHub
parent 740ec80819
commit e2709ea129
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,9 +81,14 @@ func (m *minioFileInfo) Mode() os.FileMode {
return os.ModePerm
}
var minFileDate = time.Date(1980, 1, 1, 0, 0, 0, 0, time.UTC) // Workaround for Filezilla
func (m *minioFileInfo) ModTime() time.Time {
if !m.info.LastModified.IsZero() {
return m.info.LastModified
}
return minFileDate
}
func (m *minioFileInfo) IsDir() bool {
return m.isDir