Fix mount point visibility in directory listings#50
Merged
Conversation
- Add dir_handle_t structure to wrap directory handles - Track both filesystem entries and mount point entries - Inject mount points as directory entries during readdir - Add helper functions to identify child mount points - Fix DMVFS_VERSION logging format string issue Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Remove duplicate Dmod_Free call for abs_path - Add test_helpers.c for unit testing helper functions - Add test executables to .gitignore Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Rename 'basename' variable to 'mount_name' to avoid conflict with POSIX basename() - Use sizeof(entry->name) instead of magic number for buffer size - Improve error handling in closedir to return error after cleanup - Remove stub test files Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Add IMPLEMENTATION_NOTES.md with detailed explanation of the fix - Document problem, solution, implementation details, and testing - Include examples and compatibility notes Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix hidden files from listing in mounted file systems
Fix mount point visibility in directory listings
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Directory listings (
opendir/readdir) only returned entries from the underlying filesystem, omitting subdirectories that are mount points. Mountingramfsat/anddmffsat/configswould list files in/but not show theconfigsdirectory.Changes
Core Implementation
dir_handle_twrapper structure to track directory state and mount point injectiondmvfs_readdirto inject mount points asDMFSI_ATTR_DIRECTORYentries after filesystem entries exhausteddmvfs_opendir/dmvfs_closedirto create/cleanup wrappersHelper Functions
is_direct_child_mount(dir_path, mount_path): Returns true if mount point is exactly one level below directoryget_basename(path, buffer, size): Extracts final path component for mount point namesBug Fixes
abs_pathindmvfs_opendirDMVFS_VERSIONformat string compilation errorExample
Mount points appear as directories with
DMFSI_ATTR_DIRECTORYset. The wrapper is transparent to callers; existing code works unchanged.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.