From d044d22aff867f7828b630434cecf2d703a3e402 Mon Sep 17 00:00:00 2001 From: Oleksiy Yakovenko Date: Sat, 4 Nov 2023 15:28:18 +0100 Subject: [PATCH] ddb_filebrowser compile fix --- plugins/ddb_filebrowser/errno_mkdir.patch | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/plugins/ddb_filebrowser/errno_mkdir.patch b/plugins/ddb_filebrowser/errno_mkdir.patch index 39e91f0..32a200e 100644 --- a/plugins/ddb_filebrowser/errno_mkdir.patch +++ b/plugins/ddb_filebrowser/errno_mkdir.patch @@ -1,21 +1,16 @@ diff --git a/utils.c b/utils.c -index 5ffaaa3..dc859dd 100644 +index b687ab3..a3d3bf0 100644 --- a/utils.c +++ b/utils.c -@@ -234,9 +234,13 @@ utils_check_dir (const gchar *dir, mode_t mode) +@@ -234,7 +234,11 @@ utils_check_dir (const gchar *dir, mode_t mode) if (slash) *slash = 0; if (-1 == stat (tmp, &stat_buf)) { -- int errno = mkdir (tmp, mode); -- if (0 != errno) { -- fprintf (stderr, "Failed to create %s (%d)\n", tmp, errno); +#ifdef __MINGW32__ -+ int errno1 = mkdir (tmp); ++ int err_no = mkdir (tmp); +#else -+ int errno1 = mkdir (tmp, mode); + int err_no = mkdir (tmp, mode); +#endif -+ if (0 != errno1) { -+ fprintf (stderr, "Failed to create %s (%d)\n", tmp, errno1); + if (0 != err_no) { + fprintf (stderr, "Failed to create %s (%d)\n", tmp, err_no); g_free (tmp); - return 0; - } \ No newline at end of file