From 4d8a0df31227fb3558b6976e63a29e22e78163cb Mon Sep 17 00:00:00 2001 From: MatthiasWM Date: Sat, 21 Dec 2024 12:14:31 -0600 Subject: FLUID: Improve path handling on Windows. --- fluid/fluid.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fluid') diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 9f20843f7..75bddd39e 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1981,6 +1981,14 @@ void update_history(const char *flname) { if (max_files > 10) max_files = 10; fl_filename_absolute(absolute, sizeof(absolute), flname); +#ifdef _WIN32 + // Make path canonical. + for (char *s = absolute; *s; s++) { + if (*s == '\\') + *s = '/'; + } +#endif + for (i = 0; i < max_files; i ++) #if defined(_WIN32) || defined(__APPLE__) -- cgit v1.2.3