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