warpdesign / react-explorer

File manager written in TypeScript, React, Blueprint and packaged with Electron
MIT License
232 stars 34 forks source link

Selection: fixed selection on Linux with virtual folders like /dev #429

Closed warpdesign closed 4 months ago

warpdesign commented 4 months ago

We were incorrectly using {ino,dev} as file ID but on Linux there may be virtual folders that have no unique ino like /proc, /dev.

This broke selection/navigation on / on Linux / WSL since several folders could end up having the same ID.

This PRs still uses ino + dev when possible and falls back to the string ${ino}-${dev}-${path} for virtual folders.

This fixes the navigation on / on *nix while still keeping nice features, like renaming a selected file will still reselect the correct file when the folder is refreshed.