/[BackupPC]/trunk/bin/BackupPC_tarIncCreate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_tarIncCreate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 252 by dpavlin, Mon Dec 12 13:41:04 2005 UTC revision 254 by dpavlin, Mon Dec 12 16:07:27 2005 UTC
# Line 244  sub new_tar_part { Line 244  sub new_tar_part {
244          if ($fh) {          if ($fh) {
245                  return if ($current_tar_size == 0);                  return if ($current_tar_size == 0);
246    
247                  print STDERR " $part" if ($opts{v});                  print STDERR " $part";
248    
249                  #                  #
250                  # Finish with two null 512 byte headers,                  # Finish with two null 512 byte headers,
# Line 272  sub new_tar_part { Line 272  sub new_tar_part {
272                          $items_in_part,                          $items_in_part,
273                  );                  );
274    
275                  $total_increment_size += int( ( $size + 1023 ) / 1024 ) * 1024;                  $total_increment_size += $size;
276    
277                  if ($arg->{close}) {                  if ($arg->{close}) {
278    
# Line 283  sub new_tar_part { Line 283  sub new_tar_part {
283                          }                          }
284    
285                          if ($part == 1) {                          if ($part == 1) {
286                                  print STDERR " single";                                  print STDERR " single" if ($opts{v});
287                                  move("${tar_path}/1.tar.gz", "${tar_path_final}.tar.gz");                                  move("${tar_path}/1.tar.gz", "${tar_path_final}.tar.gz");
288                                  move("${tar_path}/1.md5", "${tar_path_final}.md5");                                  move("${tar_path}/1.md5", "${tar_path_final}.md5");
289                                  rmtree $tar_path or die "can't remove temporary dir $tar_path: $!";                                  rmtree $tar_path or die "can't remove temporary dir $tar_path: $!";
290                          } else {                          } else {
291                                  print STDERR " [last]";                                  print STDERR " [last]" if ($opts{v});
292                                  move("${tar_path}", "${tar_path_final}");                                  move("${tar_path}", "${tar_path_final}");
293                          }                          }
294    
# Line 310  sub new_tar_part { Line 310  sub new_tar_part {
310          # if this is first part, create directory          # if this is first part, create directory
311    
312          if ($part == 1) {          if ($part == 1) {
313                  if (-d $tar_path) {                  if (-e $tar_path) {
314                          print STDERR "# deleting existing $tar_path\n" if ($opts{d});                          print STDERR "# deleting existing $tar_path\n" if ($opts{d});
315                          rmtree($tar_path);                          rmtree($tar_path);
316                  }                  }

Legend:
Removed from v.252  
changed lines
  Added in v.254

  ViewVC Help
Powered by ViewVC 1.1.26