selfcustody / krux

Open-source signing device firmware for Bitcoin
https://selfcustody.github.io/krux/
Other
185 stars 37 forks source link

Directories suffixed with "/" in file_manager #421

Closed jdlcdl closed 3 months ago

jdlcdl commented 4 months ago

Description

Suffixes directory names with "/" (display only) in the file_manager (also for the special "../" entry)

What is the purpose of this pull request?

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.66%. Comparing base (5c42590) to head (8bd8cbe).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #421 +/- ## =========================================== + Coverage 94.63% 94.66% +0.02% =========================================== Files 57 57 Lines 7078 7079 +1 =========================================== + Hits 6698 6701 +3 + Misses 380 378 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

odudex commented 4 months ago

looks good to me!

jdlcdl commented 4 months ago

I setup to test as of 7be968a via the simulator, w/:

But as I tested the sipeed amigo, I realized that links (working, soft, broken) were not even supported on an sdcard formatted for krux. Further, checking for existence of files and directories was drastically slower on the device than in the simulator. The subdir with 100 files and 100 subdir's was taking around 2.7s. I tried checking only for existence of files and if not assuming directory, as well as for existence of directory and if not assuming file... and performance was exactly the same. 100 files and 100 directories per subdir takes 1.6s in the latest commit above.

tadeubas commented 4 months ago

Have you tested with a loooong folder name? I think it will remove the forward slash, you need to change the code below when filename doesn't fit on the screen, you need to change to use display_filename so the forward slash is taken into account

jdlcdl commented 3 months ago

The 2 last commits are:

odudex commented 3 months ago

Thank you!