Skip to content

Fix UI dataset list to recognize symbolic links#685

Open
diodiogod wants to merge 1 commit intoostris:mainfrom
diodiogod:fix/ui-symlink-and-hydration
Open

Fix UI dataset list to recognize symbolic links#685
diodiogod wants to merge 1 commit intoostris:mainfrom
diodiogod:fix/ui-symlink-and-hydration

Conversation

@diodiogod
Copy link

Description

This PR fixes the dataset scanner in the UI to recognize symbolic links pointing to directories.

Problem

The current implementation only checks for regular directories using isDirectory(), which doesn't follow symbolic links. This prevents users from organizing datasets using symlinks without duplicating data.

Solution

  • Check if a dirent is a symbolic link
  • Use fs.statSync() to verify the symlink points to a directory
  • Gracefully handle broken symlinks with try/catch

Changes

  • Modified ui/src/app/api/datasets/list/route.ts to detect both regular directories and symbolic links

Testing

Tested with symbolic links on Windows and they now appear correctly in the dataset list.

The dataset scanner was not detecting symbolic links pointing to directories.
This commit adds support for symlinks by:
- Checking if a dirent is a symbolic link
- Using fs.statSync to verify the symlink points to a directory
- Gracefully handling broken symlinks

This allows users to organize datasets using symbolic links without
duplicating data.
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.

1 participant