Revision fb2c3df2
Von Jan Büren vor fast 3 Jahren hinzugefügt
SL/Controller/File.pm | ||
---|---|---|
679 | 679 |
|
680 | 680 |
my $size = $params{size} // 64; |
681 | 681 |
my $sfile = SL::SessionFile::Random->new(); |
682 |
my $command = 'pdftoppm -singlefile -scale-to ' . $size . ' -png' . ' ' . $filename . ' ' . $sfile->file_name; |
|
682 |
unless (-f $filename) { |
|
683 |
$::lxdebug->message(LXDebug::WARN(), "_convert_pdf_to_png failed, no file found: $filename"); |
|
684 |
return; |
|
685 |
} |
|
686 |
# quotemeta for storno case "storno\ zu\ 1020" *nix only |
|
687 |
my $command = 'pdftoppm -singlefile -scale-to ' . $size . ' -png' . ' ' . quotemeta($filename) . ' ' . $sfile->file_name; |
|
683 | 688 |
|
684 | 689 |
if (system($command) == -1) { |
685 | 690 |
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: system call failed: " . $ERRNO); |
... | ... | |
687 | 692 |
} |
688 | 693 |
if ($CHILD_ERROR) { |
689 | 694 |
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: pdftoppm failed with error code: " . ($CHILD_ERROR >> 8)); |
695 |
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: File: $filename"); |
|
690 | 696 |
return; |
691 | 697 |
} |
692 | 698 |
|
Auch abrufbar als: Unified diff
_convert_pdf_to_png: Mehr Warnungen - quotemeta für Dateinamen mit whitespace