From 0693c70f577624e66fd660a888f2d2bcd3fc180b Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Fri, 10 Jul 2020 21:49:00 -0700 Subject: First pass at fixing issue 99 A lot of code touched because low level functions needed to pass up error messages reliably, and this had to propagate up the entire driver hierarchy. Tested OK *in English* on: > Linux > OSX 10.10.x > Windows VS2017 > Windows mingw64 I have no way to test on Android, but it might work. TODO: Needs testing in other languages to verify proper UTF8 error messages, esp. with Windows VS, due to complexities with FormatMessage() -- see get_ms_errmsg() --- src/Fl_System_Driver.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Fl_System_Driver.cxx') diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx index f2b3c9584..a68d3b381 100644 --- a/src/Fl_System_Driver.cxx +++ b/src/Fl_System_Driver.cxx @@ -449,9 +449,11 @@ int Fl_System_Driver::filename_expand(char *to,int tolen, const char *from) { } int Fl_System_Driver::file_browser_load_directory(const char *directory, char *filename, - size_t name_size, dirent ***pfiles, Fl_File_Sort_F *sort) + size_t name_size, dirent ***pfiles, + Fl_File_Sort_F *sort, + char *errmsg, int errmsg_sz) { - return filename_list(directory, pfiles, sort); + return filename_list(directory, pfiles, sort, errmsg, errmsg_sz); } int Fl_System_Driver::file_type(const char *filename) -- cgit v1.2.3