-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
nothing is shown (default html page for fail)
Expected Behavior
use the page to show
Reproduction Steps
No response
Error Logs
No response
Possible Solution
- file detection using access give true if it's a file or a dir , so _webui_file_exist used by _webui_folder_exist return it's a file despite it was a folder
i'm not a c dev , but this was the solution i use
add sys/stat.h on header for linux
and replace
//return (WEBUI_FILE_EXIST(full_path, 0) == 0);by
struct stat path_stat;
if (stat(full_path, &path_stat) != 0) {
return false; // Path does not exist
#ifdef WEBUI_LOG_VERBOSE
printf("[Core]\t\t_webui_file_exist() Path does not exist\n", full_path);
#endif
}
// Check if it's a regular file (not a directory)
if (S_ISREG(path_stat.st_mode)) {
#ifdef WEBUI_LOG_VERBOSE
printf("[Core]\t\t_webui_file_exist() [%s] is a regular file\n", full_path);
#endif
return true;
} else {
#ifdef WEBUI_LOG_VERBOSE
printf("[Core]\t\t_webui_file_exist() [%s] is NOT a regular file\n", full_path);
#endif
return false;
}Version
2.5.0-beta2
Environment Details (OS name, version, etc.)
linux 5.10.0-12Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working