summaryrefslogtreecommitdiff
path: root/fileinfo.go
diff options
context:
space:
mode:
Diffstat (limited to 'fileinfo.go')
-rw-r--r--fileinfo.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/fileinfo.go b/fileinfo.go
index c5a7f1d..4724919 100644
--- a/fileinfo.go
+++ b/fileinfo.go
@@ -48,10 +48,17 @@ func (fi *FileInfo) Sys() interface{} {
}
func transformObjectInfo(info minio.ObjectInfo) fs.FileInfo {
+ base := path.Base(info.Key)
+ isDir := isDirPath(info.Key)
+ if isDir {
+ base += "/"
+ }
+
return &FileInfo{
objectInfo: &info,
- name: path.Base(info.Key),
+ isDir: isDir,
+ name: base,
size: info.Size,
mtime: info.LastModified,
}