-
-
Notifications
You must be signed in to change notification settings - Fork 335
fix: sidebar disk listing #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/internal/function.go
Outdated
// exclude timemachine | ||
if strings.HasPrefix(dir, "/Volumes/.timemachine") { | ||
if strings.HasPrefix(path, "/Volumes/.timemachine") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont this understand how that could fix the issue .
If the "path" has this prefix, which is a directory, the "filepath.Dir(path)" would also have that prefix always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily, like in my case I mounted my pen drive on /mnt
and I saw that filepath.Dir
returned /
which does not have the same prefix as /mnt
(/mnt
is the required prefix here)
This happens because the function returned Mountpoint
as /mnt
and not /mnt/
Basically it thought that mnt
is a file which it is not here. (docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Makes sense. But this might/might not fix it for windows. Need to test
I am out this weekend. Will try to test this out Mon/Tue |
I have added a commit, please let me know the name of the drive |
Also, I am thinking that the main disk should always be listed under disks section. |
What did you conclude? Can you summarize it for me @lazysegtree |
@wassup05 Not concluded anything yet. Working on it. |
Rebased with main |
Another issue For windows we get this time=2025-03-19T20:00:25.244+05:30 level=DEBUG msg="disk.Partitions() called" "number of parts"=3
time=2025-03-19T20:00:25.244+05:30 level=DEBUG msg="Returned disk by disk.Partition()" device=C: mountpoint=C: fstype=NTFS
time=2025-03-19T20:00:25.244+05:30 level=DEBUG msg="Returned disk by disk.Partition()" device=D: mountpoint=D: fstype=UDF
time=2025-03-19T20:00:25.244+05:30 level=DEBUG msg="Returned disk by disk.Partition()" device=Z: mountpoint=Z: fstype=FAT So location would be "C:" but cd to "C:" will not work as you can see below Hence, in windows, we need to attach PS C:\Users\nitin\Documents\Programming\wassup05\superfile> cd C:
PS C:\Users\nitin\Documents\Programming\wassup05\superfile> |
…ws, always list root disk, keep isExternalDiskPath mostly untouched
// if you dont define the source path to compare with | ||
// But making this true will cause slow file operations based on current implementation | ||
if runtime.GOOS == "windows" { | ||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This retains existing behaviour in windows
@wassup05 Check now. |
Looks good to me @lazysegtree, Thank you. just a comment to add the |
Okay. Noted. Also will wait for this for a while before merging - #692 (comment) |
Fixed @wassup05 's comments. |
In windows there is still a problem, the drive names are no being shown. Need to fix that. |
yeah, the |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [yorukot/superfile](https://github.com/yorukot/superfile) | minor | `v1.1.7` -> `v1.2.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>yorukot/superfile (yorukot/superfile)</summary> ### [`v1.2.1`](https://github.com/yorukot/superfile/releases/tag/v1.2.1) [Compare Source](yorukot/superfile@v1.1.7.1...v1.2.1) #### Install: [**Click me to know how to install**](https://github.com/yorukot/superfile?tab=readme-ov-file#installation) #### Changelog ##### Update - Add show_image_preview flag [`#728`](yorukot/superfile#728) - Allow specifying directory icon color in theme files [`#709`](yorukot/superfile#709) - \--hotkey-file flag and fix in configFileFlag [`#700`](yorukot/superfile#700) - File preview: Add bat as plugin [`#686`](yorukot/superfile#686) - Monokai Theme [`#673`](yorukot/superfile#673) ##### Bug fix - Fix broken link in website causing 404 [`#714`](yorukot/superfile#714) - Fix sidebar disk listing [`#708`](yorukot/superfile#708) - Switch to semver for newer 1.2.1 release [`#687`](yorukot/superfile#687) ##### Optimization - Fix: icon consts [`#719`](yorukot/superfile#719) - Refactor and unit tests for scrolling [`#710`](yorukot/superfile#710) - Refactor of wheel functions [`#695`](yorukot/superfile#695) ##### Documentation - Add info about auto update [`#721`](yorukot/superfile#721) - add cd_on_quit for fish shell [`#696`](yorukot/superfile#696) - Add Pixi installation instructions [`#690`](yorukot/superfile#690) #### New Contributors - [@​nkxxll](https://github.com/nkxxll) made their first contribution in yorukot/superfile#689 - [@​apcamargo](https://github.com/apcamargo) made their first contribution in yorukot/superfile#690 **Full Changelog**: yorukot/superfile@v1.2.0.0...v1.2.1 Assets will be generated after version change MRs are merged </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Closes #692