Skip to content

Behavior of StatObject changed in 6.0.1 #995

@coronabytes

Description

@coronabytes

Hi,

we used the following code to check if an object exists in minio.
Up till 6.0.0 this was working as expected

    public async Task<bool> ExistsAsync(string bucket, string path)
    {
        try
        {
            var stat = await _client.StatObjectAsync(new StatObjectArgs().WithBucket($"{_realm}-{bucket}").WithObject(path)).ConfigureAwait(false);

            return true;
        }
        catch (ObjectNotFoundException)
        {
            return false;
        }
    }

no exception is thrown in 6.0.1
any suggestion what props to test for nonexistence?

size == 0 maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions