Skip to content

FileBrowser resolves symlinks unexpectedly #1133

@kmdalton

Description

@kmdalton

The problem is that the FileBrowser resolves symlinks when you enter them.

Expected Behavior

If you click back (..) after entering a symlinked directory, the FileBrowser should send you back to the previous directory.

Current Behavior

If you click back (..) after entering a symlinked directory, the FileBrowser component will send you to the absolute parent of the symlink rather than the directory from which you entered it.

Steps to Reproduce the Problem

  1. Set up paths

    mkdir workingdir symlinkdir
    cd workingdir
    ln -s ../symlinkdir
    
  2. open a new jupyter notebook from workingdir

  3. paste the following into a cell and run it

    from solara.components import FileBrowser
    
    fb = FileBrowser()
    fbw = FileBrowser.widget()
    fbw
    
    Image
  4. Double click on "symlinkdir"

    Image
  5. Double click on ".."

    Image

You end up in the directory above "workingdir" whereas I'd expect to end up inside "workingdir".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions