Subversion Repositories DevTools

Rev

Rev 5818 | Rev 6133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5818 Rev 5862
Line 78... Line 78...
78
#
78
#
79
my $copyFind_dst;
79
my $copyFind_dst;
80
my $copyFind_src;
80
my $copyFind_src;
81
my $copyFind_src_len;
81
my $copyFind_src_len;
82
my $copyFind_touch;
82
my $copyFind_touch;
83
my $copyFind_time;;
83
my $copyFind_time;
-
 
84
my @copyFindDups;
84
 
85
 
85
#
86
#
86
#   Globals for error recovery
87
#   Globals for error recovery
87
#
88
#
88
my  $remove_on_error;
89
my  $remove_on_error;
Line 533... Line 534...
533
            $copyFind_dst = "$cache/$_";
534
            $copyFind_dst = "$cache/$_";
534
            $copyFind_src = $parchive;
535
            $copyFind_src = $parchive;
535
            $copyFind_src_len = length( $copyFind_src );
536
            $copyFind_src_len = length( $copyFind_src );
536
            $copyFind_touch = $cacheMarker;
537
            $copyFind_touch = $cacheMarker;
537
            $copyFind_time = 0;
538
            $copyFind_time = 0;
-
 
539
            undef @copyFindDups;
538
            File::Find::find( \&copyFind, $parchive );
540
            File::Find::find( \&copyFind, $parchive );
-
 
541
            if (@copyFindDups)
-
 
542
            {
-
 
543
                Warning("The following items where not transferred as they already existed",
-
 
544
                        "This may be due to symlinks or (Windows) case insensitive filename", @copyFindDups);
-
 
545
            }
539
            rmtree( $cacheMarker, $opt_debug );  # Works on files too !!
546
            rmtree( $cacheMarker, $opt_debug );  # Works on files too !!
540
        }
547
        }
541
        else
548
        else
542
        {
549
        {
543
            $opr = "Skip";
550
            $opr = "Skip";
Line 670... Line 677...
670
# Function        : copyFind
677
# Function        : copyFind
671
#
678
#
672
# Description     : File:Find:find callback function to transfer files
679
# Description     : File:Find:find callback function to transfer files
673
#
680
#
674
# Inputs          : None
681
# Inputs          : None
675
#                   Global: $copyFind_dst       : Target directory
682
#                   Global: $copyFind_dst       - Target directory
676
#                   Global: $copyFind_src       : Source directory
683
#                   Global: $copyFind_src       - Source directory
677
#                   Global: $copyFind_src_len   : Length of Source dir
684
#                   Global: $copyFind_src_len   - Length of Source dir
678
#                   Global: $copyFind_touch     : File to touch after each operation
685
#                   Global: $copyFind_touch     - File to touch after each operation
679
#                   Global: $copyFind_time      ; Time of last touch
686
#                   Global: $copyFind_time      - Time of last touch
680
#
687
#
681
# Returns         : 
688
# Returns         : Global: @copyFindDups       - Array of files not copied due to previous existence
682
#
689
#
683
 
690
 
684
sub copyFind
691
sub copyFind
685
{
692
{
686
    my $item = $File::Find::name;
693
    my $item = $File::Find::name;
Line 737... Line 744...
737
            unless ( $link && -l $target )
744
            unless ( $link && -l $target )
738
            {
745
            {
739
                Error("Failed to copy link [$item] to [$target]: $!");
746
                Error("Failed to copy link [$item] to [$target]: $!");
740
            }
747
            }
741
        }
748
        }
-
 
749
        elsif (-f $target)
-
 
750
        {
-
 
751
            # File already exists
-
 
752
            #   Most likely Windows filename clash. Windows files are case-insensitive
-
 
753
            push @copyFindDups, $tgt_path
-
 
754
        }
742
        elsif (File::Copy::copy($item, $target))
755
        elsif (File::Copy::copy($item, $target))
743
        {
756
        {
744
            Debug("Copying File: $target");
757
            Debug("Copying File: $target");
745
 
758
 
746
            #   Make the file ReadOnly
759
            #   Make the file ReadOnly