Objects, as well as buckets are removed basing on objecs list received
from client. As the objects are fetched by Prefix, the request for
removing object 'foo' will remove all 'foo*' objects in this bucket.
For instance, having bucket with objects like so:
awesomebucket/
├── foo
├── foobar
└── thing
Rm("awesomebucket/foo") will have effect:
awesomebucket/
└── thing
This change fixes this bug by recognizing if single object has to be
removed or the entire bucket. For single object, we don't need to walk
through directories and can request to remove directly.
The problem addressed here is that the FileInfo struct's FTime field is
set in S3 backend. This was being passed as milliseconds epoch. That
value was being passed into `time.Unix(x, 0)` which accepts arguments as
either/both (seconds, nanoseconds).
By passing milliseconds to this function expecting seconds, we have
wildly incorrect modified at timestamps.
I tested this against the same bucket that was problematic before and
it's now showing correctly :).