Subversion Repositories general

Compare Revisions

Regard whitespace Rev 1154 → Rev 1205

/fsbackup/trunk/fsbackup.pl
18,6 → 18,7
use Digest::MD5 qw(md5_base64);
use Net::FTP;
use DB_File;
use BSD::stat;
 
use constant VERB_SILENT => 0; # Silent mode, suspend all output.
use constant VERB_ERROR => 1; # Output all errors and warnings.
492,7 → 493,7
########################################
sub add_to_backup{
my($file_name, $file_dir, $md5_checksum_stat, $checksum_stat);
my($tmp, $stat_mode, $stat_uid, $stat_gid, $stat_size, $stat_mtime, $stat_time);
my($tmp, $stat_mode, $stat_uid, $stat_gid, $stat_size, $stat_mtime, $stat_time, $stat_flags);
$file_name = $_;
$file_fullpath = $File::Find::name;
504,7 → 505,8
if ((-d $file_fullpath) && (! -l $file_fullpath)){
if (check_path($file_dir, $file_name) == 1){
if ($cfg_backup_style ne "hash"){
($tmp, $tmp, $stat_mode, $tmp, $stat_uid, $stat_gid, $tmp, $stat_size, $tmp, $stat_mtime, $stat_time) = stat($file_fullpath);
($tmp, $tmp, $stat_mode, $tmp, $stat_uid, $stat_gid, $tmp, $stat_size, $tmp, $stat_mtime, $stat_time, $tmp, $tmp, $tmp, $tmp, $tmp, $stat_flags, $tmp) = stat($file_fullpath);
unless($stat_flags & UF_NODUMP) {
$stat_mode = sprintf ("%04o", $stat_mode & 07777);
$file_fullpath_esc =~ s/^\/(.*)$/$1/;
my ($sec,$min,$hour,$mday,$mon,$year) = localtime($stat_time);
525,6 → 527,14
$active_hash_new{$file_fullpath} = "D";
check_update($file_fullpath, "D", $file_fullpath, $stat_size);
}
else {
push @fs_notpath, "$file_dir/$file_name"; # if nodump - skip all subitems
if ($cfg_stopdir_prune == 1){
$File::Find::prune = 1;
return;
}
}
}
} else {
if ($cfg_stopdir_prune == 1){
$File::Find::prune = 1;
534,7 → 544,8
# Работаем с файлами
} elsif ((-f $file_fullpath) || (-l $file_fullpath)){
if (check_path($file_dir, $file_name) == 1){
($tmp, $tmp, $stat_mode, $tmp, $stat_uid, $stat_gid, $tmp, $stat_size, $tmp, $stat_mtime) = stat($file_fullpath);
($tmp, $tmp, $stat_mode, $tmp, $stat_uid, $stat_gid, $tmp, $stat_size, $tmp, $stat_mtime, $stat_time, $tmp, $tmp, $tmp, $tmp, $tmp, $stat_flags, $tmp) = stat($file_fullpath);
unless($stat_flags & UF_NODUMP) {
$checksum_stat= md5_base64("$stat_mtime/$stat_size/$stat_mode/$stat_uid/$stat_gid");
# $file_fullpath_md5 = md5_base64($file_fullpath);
$file_fullpath_md5 = $file_fullpath;
558,6 → 569,7
}
}
}
}
 
###############################################
# Проверяем изменился ли файл или нет, если да апдейтим лог.