projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23a76f4
)
extract path from full_path if missing
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 18 Dec 2013 15:10:11 +0000
(16:10 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 18 Dec 2013 15:10:11 +0000
(16:10 +0100)
lib/MojoFacets/Import/File.pm
patch
|
blob
|
history
diff --git
a/lib/MojoFacets/Import/File.pm
b/lib/MojoFacets/Import/File.pm
index
503be1d
..
926937f
100644
(file)
--- a/
lib/MojoFacets/Import/File.pm
+++ b/
lib/MojoFacets/Import/File.pm
@@
-19,6
+19,10
@@
sub data {
my $self = shift;
my $path = $self->path;
+ if ( ! $path ) {
+ $path = $self->full_path || die "no path or full_path";
+ $path =~ s{^.+/([^/]+)$}{$1};
+ }
# we could use Mojo::JSON here, but it's too slow
# $data = from_json read_file $path;