Skip to content

Commit

Permalink
perf: don't call when reading attributes from a file
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Mar 5, 2024
1 parent 6c9182c commit 5036286
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ public JsonElement getAttributesFromContainer(
final String normalResourcePath) throws N5Exception {

final String absolutePath = keyValueAccess.compose(uri, normalResourceParent, normalResourcePath);
if (!keyValueAccess.exists(absolutePath))

if (!keyValueAccess.isFile(absolutePath))
return null;

try (final LockedChannel lockedChannel = keyValueAccess.lockForReading(absolutePath)) {
Expand Down

0 comments on commit 5036286

Please sign in to comment.