From 78d8ac03db1a584df21f7245daeeaa9696b62251 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Feb 2019 13:50:51 +0100 Subject: [PATCH] Only use get_current_dir_name on Linux Signed-off-by: falkTX --- dgl/src/Window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index 47b2e458..7da52c75 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -1213,6 +1213,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) String startDir(options.startDir); +# ifdef DISTRHO_OS_LINUX if (startDir.isEmpty()) { if (char* const dir_name = get_current_dir_name()) @@ -1221,6 +1222,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) std::free(dir_name); } } +# endif DISTRHO_SAFE_ASSERT_RETURN(startDir.isNotEmpty(), false);