Skip Menu |

This queue is for tickets about the File-UserConfig CPAN distribution.

Report information
The Basics
Id: 79828
Status: new
Priority: 0/
Queue: File-UserConfig

People
Owner: Nobody in particular
Requestors: stefbv70 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)



Subject: Failed to copy user data to... error.
If the first run of my app is done from the package dir where exists a directory named 'share' which contains my default configs, I get an "Failed to copy user data to..." error. For my app this can be easily fixed with the following small patch: --- lib/File/UserConfig.pm.orig 2012-09-24 15:09:10.269794039 +0300 +++ lib/File/UserConfig.pm 2012-09-24 15:12:29.703551045 +0300 @@ -162,7 +162,7 @@ # If we don't have a sharedir, get it # from the dist. - unless ( $self->sharedir ) { + unless ( -d $self->sharedir ) { $self->{sharedir} = File::ShareDir::dist_dir($self- Show quoted text
>dist);
} I'd very much appreciate it, if you could apply it to the module, if you think it is OK to do so. Thank you, Ştefan Suciu.
Subject: user_config.patch
--- lib/File/UserConfig.pm.orig 2012-09-24 15:09:10.269794039 +0300 +++ lib/File/UserConfig.pm 2012-09-24 15:12:29.703551045 +0300 @@ -162,7 +162,7 @@ # If we don't have a sharedir, get it # from the dist. - unless ( $self->sharedir ) { + unless ( -d $self->sharedir ) { $self->{sharedir} = File::ShareDir::dist_dir($self->dist); }
From: stefbv70 [...] gmail.com
On Mon Sep 24 08:46:38 2012, stefbv wrote: Show quoted text
> If the first run of my app is done from the package dir where >
Sorry, I mean: Unless the first run of my app is done from the package dir where... Thank you, Ştefan Suciu.
From: stefbv70 [...] gmail.com
Update, sorry, it is my first patch... Maybe better like this: unless ( $self->sharedir and -d $self->sharedir ) { Regards, Ştefan.
Subject: user_config.patch
--- lib/File/UserConfig.pm.orig 2012-09-24 19:00:44.892467866 +0300 +++ lib/File/UserConfig.pm 2012-09-24 19:01:21.240313951 +0300 @@ -162,7 +162,7 @@ # If we don't have a sharedir, get it # from the dist. - unless ( $self->sharedir ) { + unless ( $self->sharedir and -d $self->sharedir ) { $self->{sharedir} = File::ShareDir::dist_dir($self->dist); }