From eafdf6dea5918688560141e1fb9242ee1c1820fe Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 6 May 2011 20:26:28 +0200 Subject: Fix XDG_{CONFIG,DATA}_HOME handling bug (use File::BaseDir for it). thx mxey --- lib/App/Raps2.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm index 6710d48..f05f21e 100644 --- a/lib/App/Raps2.pm +++ b/lib/App/Raps2.pm @@ -38,6 +38,7 @@ use base 'Exporter'; use App::Raps2::Password; use App::Raps2::UI; use Carp q(confess); +use File::BaseDir qw(config_home data_home); use File::Path qw(make_path); use File::Slurp qw(slurp write_file); @@ -105,9 +106,8 @@ sub new { my ($obj, %conf) = @_; my $ref = {}; - $ref->{'xdg_conf'} = $ENV{'XDG_CONFIG_HOME'} // "$ENV{HOME}/.config/raps2"; - $ref->{'xdg_data'} = $ENV{'XDG_DATA_HOME'} // - "$ENV{HOME}/.local/share/raps2"; + $ref->{'xdg_conf'} = config_home('raps2'); + $ref->{'xdg_data'} = data_home('raps2'); $ref->{'ui'} = App::Raps2::UI->new(); -- cgit v1.2.3