Fix file dialog not appearing on snap build

Fix #7607 - Don't disable core dumps when building for snap distribution. Doing so will not allow the xdg-desktop-portal from opening the file dialog. This is because the portal attempts to call entries from /proc/[pid]/xxxx which are restricted to root when core dumps are disabled.
This commit is contained in:
Jonathan White 2022-05-01 15:46:31 -04:00
parent 6f20f0e2ec
commit dab7047113

View File

@ -89,7 +89,9 @@ namespace Bootstrap
success = success && (setrlimit(RLIMIT_CORE, &limit) == 0);
#endif
#if defined(HAVE_PR_SET_DUMPABLE)
// NOTE: Dumps cannot be disabled for snap builds as it prevents desktop portals from working
// See https://github.com/keepassxreboot/keepassxc/issues/7607#issuecomment-1109005206
#if defined(HAVE_PR_SET_DUMPABLE) && !defined(KEEPASSXC_DIST_SNAP)
success = success && (prctl(PR_SET_DUMPABLE, 0) == 0);
#endif