Skip to content
Browse files

Use File::Copy->move instead of rename

Because we are now cross-device moves so need the extra features
  • Loading branch information...
1 parent 9a8c952 commit bcf7dd7a945c63b80856a0a708e96f14096b8d66 @afresh1 committed Oct 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 CurrentTorrents.pl
View
5 CurrentTorrents.pl
@@ -7,6 +7,7 @@
use Time::Local;
use Fcntl ':flock';
use File::Basename;
+use File::Copy qw( move );
use Mojo::JSON;
#use YAML;
@@ -205,8 +206,8 @@
if ( $dir eq $OBT->{DIR_NEW_TORRENT} ) {
print "Moving $file to current torrents\n";
- rename( "$dir/$file", $OBT->{DIR_TORRENT} . "/" . $file )
- or die "Couldn't rename '$file': $!";
+ move( "$dir/$file", $OBT->{DIR_TORRENT} . "/" . $file )
+ or die "Couldn't move '$file': $!";
$dir = $OBT->{DIR_TORRENT};
$keep{$hash}{dir} = $dir;

0 comments on commit bcf7dd7

Please sign in to comment.
Something went wrong with that request. Please try again.