You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
structstatpath_stat;
if (stat(full_path, &path_stat) !=0) {
return false; // Path does not exist#ifdefWEBUI_LOG_VERBOSEprintf("[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)) {
#ifdefWEBUI_LOG_VERBOSEprintf("[Core]\t\t_webui_file_exist() [%s] is a regular file\n", full_path);
#endifreturn true;
} else {
#ifdefWEBUI_LOG_VERBOSEprintf("[Core]\t\t_webui_file_exist() [%s] is NOT a regular file\n", full_path);
#endifreturn false;
}
Version
2.5.0-beta2
Environment Details (OS name, version, etc.)
linux 5.10.0-12
The text was updated successfully, but these errors were encountered:
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
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
Version
2.5.0-beta2
Environment Details (OS name, version, etc.)
The text was updated successfully, but these errors were encountered: