Fix problem with asset export not handling certain URLs with dots in them correctly.
This commit is contained in:
parent
a4784a31e9
commit
f7a61cd5c6
2 changed files with 17 additions and 12 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
7.1.1
|
||||||
|
- fix: some issues with asset exports not handling URLs with dots correctly
|
||||||
|
|
||||||
7.1.0
|
7.1.0
|
||||||
- fix: mysql and mysqldump were transposed in upgrade.pl --help
|
- fix: mysql and mysqldump were transposed in upgrade.pl --help
|
||||||
- fix: adding Matrix listings committing the current version tag
|
- fix: adding Matrix listings committing the current version tag
|
||||||
|
|
|
||||||
|
|
@ -108,25 +108,27 @@ sub _exportAsHtml {
|
||||||
my $filename;
|
my $filename;
|
||||||
|
|
||||||
if ($url =~ /\./) {
|
if ($url =~ /\./) {
|
||||||
$url =~ /^(.*)\/(.*)$/;
|
if ($url =~ /^(.*)\/(.*)$/) {
|
||||||
$path = $1;
|
$path = $1;
|
||||||
$filename = $2;
|
$filename = $2;
|
||||||
if ($filename eq "") {
|
if ($filename eq "") {
|
||||||
$filename = $path;
|
$filename = $path;
|
||||||
|
$path = undef;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$path = undef;
|
$path = undef;
|
||||||
|
$filename = $url;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$path = $url;
|
$path = $url;
|
||||||
$filename = $index;
|
$filename = $index;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($path) {
|
$path = $self->session->config->get("exportPath") . (length($path)? "/$path" : "");
|
||||||
$path = $self->session->config->get("exportPath") . "/" . $path;
|
eval { mkpath($path) };
|
||||||
eval { mkpath($path) };
|
if($@) {
|
||||||
if($@) {
|
return (0, sprintf($i18n->get('could not create path'), $path, $@));
|
||||||
return (0, sprintf($i18n->get('could not create path'), $path, $@));
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
$path .= "/".$filename;
|
$path .= "/".$filename;
|
||||||
|
|
||||||
my $file = eval { FileHandle->new(">".$path) or die "$!" };
|
my $file = eval { FileHandle->new(">".$path) or die "$!" };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue