diff options
-rw-r--r-- | MANIFEST | 4 | ||||
-rwxr-xr-x | lib/App/Dthumb.pm | 3 | ||||
-rw-r--r-- | lib/App/Dthumb/Data.pm.PL | 5 | ||||
-rw-r--r-- | share/html_end.dthumb (renamed from share/html_end) | 0 | ||||
-rw-r--r-- | share/html_start.dthumb (renamed from share/html_start) | 0 |
5 files changed, 8 insertions, 4 deletions
@@ -8,8 +8,8 @@ MANIFEST This list of files MANIFEST.SKIP README share/close.png -share/html_end -share/html_start +share/html_end.dthumb +share/html_start.dthumb share/loading.gif share/main.css share/next.png diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index fc21059..365eaba 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -216,8 +216,7 @@ sub create_files { mkdir($datadir); } - for my $file (qw(close.png loading.gif main.css next.png pause.png - play.png previous.png shadowbox.css shadowbox.js)) { + for my $file ($self->{data}->list_archived()) { open(my $fh, '>', "${datadir}/${file}"); print {$fh} $self->{data}->get($file); close($fh); diff --git a/lib/App/Dthumb/Data.pm.PL b/lib/App/Dthumb/Data.pm.PL index c430c0a..0e602ef 100644 --- a/lib/App/Dthumb/Data.pm.PL +++ b/lib/App/Dthumb/Data.pm.PL @@ -59,6 +59,11 @@ sub set_vars { $self->{replace} = \%vars; } +sub list_archived { + my ($self) = @_; + return grep { ! /\.dthumb$/ } $self->section_data_names(); +} + sub get { my ($self, $name) = @_; my $data = $self->section_data($name); diff --git a/share/html_end b/share/html_end.dthumb index 9943ff0..9943ff0 100644 --- a/share/html_end +++ b/share/html_end.dthumb diff --git a/share/html_start b/share/html_start.dthumb index baf8167..baf8167 100644 --- a/share/html_start +++ b/share/html_start.dthumb |