Revision 857b8879
Von Jan Büren vor fast 5 Jahren hinzugefügt
SL/GoBD.pm | ||
---|---|---|
19 | 19 |
use SL::DB::Helper::ALL; # since we work on meta data, we need everything |
20 | 20 |
use SL::DB::Helper::Mappings; |
21 | 21 |
use SL::Locale::String qw(t8); |
22 |
use SL::SessionFile::Random; |
|
22 | 23 |
use SL::Version; |
23 | 24 |
|
24 | 25 |
use Rose::Object::MakeMethods::Generic ( |
... | ... | |
179 | 180 |
$self->files->{'gdpdu-01-08-2002.dtd'} = File::Spec->catfile('users', 'gdpdu-01-08-2002.dtd'); |
180 | 181 |
|
181 | 182 |
# make zip |
182 |
my ($fh, $zipfile) = File::Temp::tempfile();
|
|
183 |
my $sfile = SL::SessionFile::Random->new(mode => "w");
|
|
183 | 184 |
my (@files, %name_subs); |
184 | 185 |
while (my ($name, $file) = each %{ $self->files }) { |
185 | 186 |
push @files, $file; |
186 | 187 |
$name_subs{$file} = $name; |
187 | 188 |
} |
188 | 189 |
|
189 |
zip \@files => $zipfile, FilterName => sub { s/.*/$name_subs{$_}/; }
|
|
190 |
zip \@files => $sfile->file_name, FilterName => sub { s/.*/$name_subs{$_}/; }
|
|
190 | 191 |
or die "zip failed: $ZipError\n"; |
191 | 192 |
|
192 |
return $zipfile;
|
|
193 |
return $sfile->file_name;
|
|
193 | 194 |
} |
194 | 195 |
|
195 | 196 |
sub do_xml_file { |
Auch abrufbar als: Unified diff
bugfix-422: GoBD kivi session_files statt tempfiles