-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
LVGL9.2.2 lv_file_explorer.c has Minor bugs that affect functionality. #7552
Comments
@lifeng5478 , since you are aware of the fix, would you open a pull request to the upstream? Thank you! |
While at it you might also want to change line 495: if((lv_strcmp(str_fn, ".") == 0)) return; as clicking into an empty spot in the table will have undesired effects ..... Thanks too :) |
Also another issue which I came across is that if you use your QAM (Quick Access Menu) so either lv_strlcpy has to add an extra \0 but i suggest as safer quick fix to add an \0 when adding the '/'. Although ugly I hope I made myself clear ..... |
https://github.com/lifeng5478/lvgl line 502:
|
I don't know what's going on, I can't commit it, so I forked one in my warehouse |
OK I will have a look at the commit .... (have only found this thread here). The question is what the definition of a path is and if it needs a '/' at the end or not (and who is relying on it ) |
@lifeng5478 that is the process, if you have the correction, fork the lvgl into your own github account, then commit the changes on your fork, after doing that you may be able to create a pull request for evalution to put the commit on the lvgl upstream. Please let me know if you have any other question regarding contribution. |
Can you test the same scenario using the latest commit? There have been multiple fixes in the file Explorer widget. |
Just from code review, I would state the current 9.3.0-dev code (https://github.com/lvgl/lvgl/blob/master/src/others/file_explorer/lv_file_explorer.c#L621) has similar issues. The code expects a "/" at each directory so in this regard the changes made are not in line .... (there need to be a decision on definition of currentpath "/" at end or not)
Just my 2c |
I'm using the
Screencast.from.07-01-25.19.41.03.webm |
You are version 9.3, 9.3 has a lot of problems, it is not recommended, 9.2.2 is acceptable. |
Then, you will have to backport the file explorer fixes from 9.3 to 9.2. |
@lifeng5478 I looked more closely to your change proposal and found another bug: Now there is not anymore a "/" at the end of the explorer->current_path and therefore using ".." will jump up 2 directories (2x strip) Also in your proposal (at least on my system) clicking outside the table (short directory, str_fn = "") there is still a "/" applied to the end [as due to "%s/%s"] and therefore mixing those 2 systems with possible undesired side effects (e.g. using "..") Cheers |
This may not work, as getting the current path will also result in errors. Did you try modifying that? It should be feasible. |
Sorry I don't understand. What do exactly mean by "this" ? At the moment I am running your proposed changes plus the above mentioned addition: works for me well. The problem I see is that current_path is part of the API :(const char * lv_file_explorer_get_current_path(const lv_obj_t * obj) [But as far as I could see no definition of the return value] and by changing the return value to be without "/" other things my break even if it is not useful to have this "/" at the end. Me personally I am fine with both solutions it just has to be defined properly and work ... |
LVGL version
V9.2.2
Platform
this! After the folder is entered, it cannot be re-entered. I fixed Like This! For your information!
What happened?
When the file manager enters the secondary directory, it reverts again and cannot be entered again.
How to reproduce?
static void browser_file_event_handler(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_user_data(e);
lv_file_explorer_t * explorer = (lv_file_explorer_t *)obj;
}
The text was updated successfully, but these errors were encountered: