Updated striker-get-screenshots to create the screenshot directory.

Also fixed a typo in the POD for Storage->make_directory().

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 5ec395c53a
commit be89bfb438
  1. 2
      Anvil/Tools/Storage.pm
  2. 12
      tools/striker-get-screenshots

@ -2744,7 +2744,7 @@ AND
This creates a directory (and any parent directories).
$anvil->Storage->make_directory({directory => "/foo/bar/baz", owner => "me", grou[ => "me", group => 755});
$anvil->Storage->make_directory({directory => "/foo/bar/baz", owner => "me", group => "me", mode => "0755"});
If it fails to create the directory, C<< 1 >> will be returned. Otherwise, C<< 0 >> will be returned.

@ -185,6 +185,18 @@ sub check_screenshot_directory
{
my ($anvil) = @_;
# Does the directory even exist?
if (not -d $anvil->data->{path}{directories}{screenshots})
{
$anvil->Storage->make_directory({
debug => 2,
directory => $anvil->data->{path}{directories}{screenshots},
owner => "striker-ui-api",
group => "striker-ui-api",
mode => "0755",
});
}
foreach my $directory ($anvil->data->{path}{directories}{opt_alteeve}, $anvil->data->{path}{directories}{screenshots})
{
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { directory => $directory }});

Loading…
Cancel
Save