@ -1223,12 +1223,16 @@ 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 } } ) ;
$ anvil - > Log - > entry ( { source = > $ THIS_FILE , line = > __LINE__ , level = > 1 , key = > "log_0170" , variables = > {
if ( $ failed )
method = > "copy_file" ,
{
source_file = > $ source_file ,
# Failed to create the directory, abort.
target_file = > $ target_file ,
$ anvil - > Log - > entry ( { source = > $ THIS_FILE , line = > __LINE__ , level = > 1 , key = > "log_0170" , variables = > {
} } ) ;
method = > "copy_file" ,
return ( 1 ) ;
source_file = > $ source_file ,
target_file = > $ target_file ,
} } ) ;
return ( 1 ) ;
}
}
}
# Now backup the file.
# Now backup the file.
@ -1713,28 +1717,27 @@ sub make_directory
my $ shell_call = "
my $ shell_call = "
if [ - d '".$working_directory."' ] ;
if [ - d '".$working_directory."' ] ;
then
then
".$anvil->data->{path}{exe}{echo}." 'exists'
".$anvil->data->{path}{exe}{echo}." 'exists'
else
else
".$anvil->data->{path}{exe}{'mkdir'}." $ working_directory
".$anvil->data->{path}{exe}{'mkdir'}." $ working_directory
" ;
" ;
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