This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 392e777400b9adf0165c52400bb2bf0ea8263ba1
Author: Andreas Tille <[email protected]>
Date:   Sun Aug 26 23:13:29 2012 +0200

    Perls move() function is unreliable when moving directories so we need to 
check in advance and prevent using move() when the source is a directory
---
 scripts/uscan.pl |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 2562712..d80baaa 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -2170,13 +2170,13 @@ sub get_main_source_dir($$$$) {
     mkdir($main_source_dir) or uscan_die("Unable to create temporary source 
directory $main_source_dir\n");
     foreach my $file (@files) {
        unless ($file =~ /^\.\.?/) {
-           # move("${tempdir}/$file", $main_source_dir) or die("Unable to move 
${tempdir}/$file directory $main_source_dir\n");
-           unless (move("${tempdir}/$file", $main_source_dir)) {
-               # HELP: why can't perl move not move directories????
-               print "Perl move seems to be not able to ` 
move(\"${tempdir}/$file\", $main_source_dir) ` ... trying system mv\n" if 
$debug;
-               system('mv', "${tempdir}/$file", $main_source_dir);
-           }
-       }
+           if ( -d "${tempdir}/$file" ) {
+                # HELP: why can't perl move not move directories????
+                system( "mv ${tempdir}/$file $main_source_dir" ) ;
+            } else {
+                move("${tempdir}/$file", $main_source_dir) or die("Unable to 
move ${tempdir}/$file directory $main_source_dir\n");
+            }
+        }
     }
     return $main_source_dir;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/collab-maint/devscripts.git

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to