Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/dmdevfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,15 @@ dmod_dmfsi_dif_api_declaration( 1.0, dmdevfs, int, _opendir, (dmfsi_context_t ct

if (!is_directory(ctx, path))
{
// Check if the path is a file (device node)
driver_node_t* driver_node = find_driver_node(ctx, path);
if (driver_node != NULL)
{
// Path exists but is a file, not a directory
DMOD_LOG_ERROR("Not a directory: %s\n", path);
return DMFSI_ERR_NOT_FOUND;
}
// Path doesn't exist at all
DMOD_LOG_ERROR("Directory not found: %s\n", path);
return DMFSI_ERR_NOT_FOUND;
}
Expand Down