fix package importing
This commit is contained in:
parent
2de16a2cf8
commit
eaf0a55ec1
2 changed files with 5 additions and 1 deletions
|
|
@ -10,6 +10,7 @@
|
|||
- fix: wrong ssl link in iTransact settings
|
||||
- fix thumbnail script with Graphics::Magick
|
||||
- fix ordering of statuses in In/Out board
|
||||
- fix package importing
|
||||
|
||||
7.4.5
|
||||
- fix: Apostrophy incorrectly escaped as double quote in some places
|
||||
|
|
|
|||
|
|
@ -181,7 +181,10 @@ sub importPackage {
|
|||
foreach my $file (sort(@{$decompressed->getFiles})) {
|
||||
next unless ($decompressed->getFileExtension($file) eq "json");
|
||||
$error->info("Found data file $file");
|
||||
my $data = eval{JSON::jsonToObj($decompressed->getFileContentsAsScalar($file))};
|
||||
my $data = eval{
|
||||
local $JSON::UnMapping = 1;
|
||||
JSON::jsonToObj($decompressed->getFileContentsAsScalar($file))
|
||||
};
|
||||
if ($@ || $data->{properties}{assetId} eq "" || $data->{properties}{className} eq "" || $data->{properties}{revisionDate} eq "") {
|
||||
$error->error("package corruption: ".$@) if ($@);
|
||||
return "corrupt";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue