@ -147,14 +147,25 @@ func (handler *Driver) List(ctx context.Context, base string, recursive bool) ([
if err != nil {
if err != nil {
continue
continue
}
}
res = append ( res , response . Object {
Name : path . Base ( * object . Key ) ,
if strings . HasSuffix ( * object . Key , "/" ) {
Source : * object . Key ,
res = append ( res , response . Object {
RelativePath : filepath . ToSlash ( rel ) ,
Name : path . Base ( * object . Key ) ,
Size : uint64 ( * object . Size ) ,
RelativePath : filepath . ToSlash ( rel ) ,
IsDir : false ,
Size : 0 ,
LastModify : time . Now ( ) ,
IsDir : true ,
} )
LastModify : time . Now ( ) ,
} )
} else {
res = append ( res , response . Object {
Name : path . Base ( * object . Key ) ,
Source : * object . Key ,
RelativePath : filepath . ToSlash ( rel ) ,
Size : uint64 ( * object . Size ) ,
IsDir : false ,
LastModify : * object . LastModified ,
} )
}
}
}
return res , nil
return res , nil