Skip to content

Commit

Permalink
Merge pull request #38 from cmhulbert/perf/fewerIsDirectoryCalls
Browse files Browse the repository at this point in the history
perf: don't call  when reading attributes from a file
  • Loading branch information
bogovicj authored Mar 5, 2024
2 parents ad07c2f + 5036286 commit 6af6738
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,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 6af6738

Please sign in to comment.