@ -1223,6 +1223,9 @@ fi";
port = > $ port ,
} ) ;
$ anvil - > Log - > variables ( { source = > $ THIS_FILE , line = > __LINE__ , level = > $ debug , list = > { failed = > $ failed } } ) ;
if ( $ failed )
{
# Failed to create the directory, abort.
$ anvil - > Log - > entry ( { source = > $ THIS_FILE , line = > __LINE__ , level = > 1 , key = > "log_0170" , variables = > {
method = > "copy_file" ,
source_file = > $ source_file ,
@ -1230,6 +1233,7 @@ fi";
} } ) ;
return ( 1 ) ;
}
}
# Now backup the file.
my ( $ output , $ error , $ return_code ) = $ anvil - > Remote - > call ( {
@ -1719,22 +1723,21 @@ else
" ;
if ( $ mode )
{
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chmod' } . " " . $ mode . "\n" ;
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chmod' } . " " . $ mode . " " . $ working_directory . " \n" ;
}
if ( ( $ user ) && ( $ group ) )
{
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " " . $ user . ":" . $ group . "\n" ;
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " " . $ user . ":" . $ group . " " . $ working_directory . " \n" ;
}
elsif ( $ user )
{
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " " . $ user . ":\n" ;
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " " . $ user . ": " . $ working_directory . " \n" ;
}
elsif ( $ group )
{
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " :" . $ group . "\n" ;
$ shell_call . = " " . $ anvil - > data - > { path } { exe } { 'chown' } . " :" . $ group . " " . $ working_directory . " \n" ;
}
$ shell_call . = "
if [ - d '".$working_directory."' ] ;
$ shell_call . = " if [ -d '" . $ working_directory . " ' ] ;
then
".$anvil->data->{path}{exe}{echo}." 'created'
else