diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index b1866f5e63ea7..c50c2e98eba25 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -68,11 +68,9 @@ OUString getCrashUserProfileDirectory() rtl::Bootstrap::expandMacros(url); osl::Directory::create(url); -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID - return url.copy(7); -#elif defined WNT - return url.copy(8); -#endif + OUString aProfilePath; + osl::FileBase::getSystemPathFromFileURL(url, aProfilePath); + return aProfilePath; } }