Revert "Removing xdg-config."

This reverts commit 7f2f8c41f8.
This commit is contained in:
sergiotarxz 2024-06-24 20:09:12 +02:00
parent dac81bf4c3
commit 1fc49f343d

View File

@ -38,8 +38,15 @@ sub connect {
sub _db_path($class) {
my $home = $ENV{HOME};
my $flatpak_config_dir = $ENV{XDG_CONFIG_HOME};
my $db_path = '';
$db_path = $home . '/' if $home;
{
if ($flatpak_config_dir) {
$db_path = $flatpak_config_dir . '/';
next;
}
$db_path = $home . '/' if $home;
}
$db_path .= '.japachar/db.sqlite';
path($db_path)->parent->mkpath;
return $db_path;