Permalink
Browse files

//Added some debug (commented in production)

  • Loading branch information...
1 parent 706be21 commit c11c6fed9536199c466f47fd157d778e30709379 stronk7 committed Jul 27, 2003
Showing with 3 additions and 0 deletions.
  1. +3 −0 backup/lib.php
View
3 backup/lib.php
@@ -252,13 +252,15 @@ function clean_temp_data ($preferences) {
function backup_copy_file ($from_file,$to_file) {
if (is_file($from_file)) {
+ //echo "<br>Copying ".$from_file." to ".$to_file; //Debug
$perms=fileperms($from_file);
return copy($from_file,$to_file) && chmod($to_file,$perms);
}
else if (is_dir($from_file)) {
return backup_copy_dir($from_file,$to_file);
}
else{
+ //echo "<br>Error: not file or dir ".$from_file; //Debug
return false;
}
}
@@ -268,6 +270,7 @@ function backup_copy_dir($from_file,$to_file) {
global $CFG;
if (!is_dir($to_file)) {
+ //echo "<br>Creating ".$to_file; //Debug
mkdir($to_file,$CFG->directorypermissions);
}
$dir = opendir($from_file);

0 comments on commit c11c6fe

Please sign in to comment.