[Bps-public-commit] r10202 - bpsbuilder/BPB/lib/BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Dec 30 11:49:41 EST 2007


Author: sunnavy
Date: Sun Dec 30 11:49:41 2007
New Revision: 10202

Modified:
   bpsbuilder/BPB/lib/BPB/Source/Base.pm

Log:
we should check whether the source file is defined before copy

Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm	Sun Dec 30 11:49:41 2007
@@ -186,10 +186,12 @@
     my $self = shift;
     my %file = @_;
     for ( keys %file ) {
-        my $cmd = join ' ', 'cp', $file{$_},
-          File::Spec->catfile( $self->directory, $self->name || $self->path,
-            $_ );
-        system($cmd);
+        if ( $file{$_} ) {
+            my $cmd = join ' ', 'cp', $file{$_},
+              File::Spec->catfile( $self->directory, $self->name || $self->path,
+                $_ );
+            system($cmd);
+        }
     }
 }
 



More information about the Bps-public-commit mailing list