/[psinib]/psinib.pl
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 /psinib.pl

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

revision 1.18 by dpavlin, Mon Oct 27 18:58:41 2003 UTC revision 1.19 by dpavlin, Mon Oct 27 19:07:32 2003 UTC
# Line 249  sub snap_share { Line 249  sub snap_share {
249          if (-l $bl) {          if (-l $bl) {
250                  $real_bl=readlink($bl) || die "can't read link $bl: $!";                  $real_bl=readlink($bl) || die "can't read link $bl: $!";
251                  $real_bl="$BACKUP_DEST/$host/$dir/$real_bl" if (substr($real_bl,0,1) ne "/");                  $real_bl="$BACKUP_DEST/$host/$dir/$real_bl" if (substr($real_bl,0,1) ne "/");
252                  undef $real_bl if (! -e $real_bl);                  if (! -e $real_bl) {
253                            xlog($share,"latest link $bl -> $real_bl not valid, removing it");
254                            unlink $bl || die "can't remove link $bl: $!";
255                            undef $real_bl;
256                    }
257          }          }
258          if (! $real_bl) {          if (! $real_bl) {
259                  xlog($share,"no old backup, trying to find last backup,");                  xlog($share,"no old backup, trying to find last backup");
260                  if (opendir(BL_DIR, "$BACKUP_DEST/$host/$dir")) {                  if (opendir(BL_DIR, "$BACKUP_DEST/$host/$dir")) {
261                          my @bl_dirs = sort grep { !/^\./ && -d "$BACKUP_DEST/$host/$dir/$_" } readdir(BL_DIR);                          my @bl_dirs = sort grep { !/^\./ && -d "$BACKUP_DEST/$host/$dir/$_" } readdir(BL_DIR);
262                          closedir(BL_DIR);                          closedir(BL_DIR);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.26