Skip to content

Fix/empty container dataset - #38

Merged
jeswr merged 5 commits into
mainfrom
fix/empty-container-dataset
Jul 28, 2026
Merged

Fix/empty container dataset#38
jeswr merged 5 commits into
mainfrom
fix/empty-container-dataset

Conversation

@PreciousOritsedere

Copy link
Copy Markdown
Contributor

Summary

Empty folders failed because we only looked for containers via ldp:contains.

Related to solid-file-manager #61 and PR #64 review.

I am implementing the fix here, to allow me use this package in the solid file manager

@jeswr jeswr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/solid/ContainerDataset.ts Outdated

get container(): Container | undefined {
// Return the first container in the dataset
// Non-empty containers advertise children via ldp:contains.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the original comment

Comment thread src/solid/ContainerDataset.ts Outdated
return s
}

// Empty containers have no ldp:contains; resolving via rdf:type instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Empty containers have no ldp:contains; resolving via rdf:type instead.
// If the container is empty, then the only instance of `ldp:Container`
// and `ldp:BasicContainer` in this dataset should be the container
// itself.

@jeswr
jeswr merged commit 0d7959b into main Jul 28, 2026
5 checks passed
@jeswr
jeswr deleted the fix/empty-container-dataset branch July 28, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants