* bugfix: rename works not across filesystem boundaries
authormobst
Wed, 11 Feb 2009 11:08:08 +0000
changeset 14 744cb8934861
parent 13 d9694ca1b7fc
child 15 ae5ccba87bfc
child 16 bb1b17fee8c3
* bugfix: rename works not across filesystem boundaries * using File::Copy::move instead * fixes empty logbuch file on webian2
debian/changelog
log.pl
--- a/debian/changelog	Wed Feb 11 10:34:18 2009 +0000
+++ b/debian/changelog	Wed Feb 11 11:08:08 2009 +0000
@@ -1,3 +1,11 @@
+logbuch (0.27-1) stable; urgency=low
+
+  * new upstream
+  * use File::Copy::move instead of rename to support move between
+    filesystems
+
+ -- Marcus Obst <mobst@schlittermann.de>  Wed, 11 Feb 2009 12:05:40 +0100
+
 logbuch (0.26-1) stable; urgency=low
 
   * new upstream
--- a/log.pl	Wed Feb 11 10:34:18 2009 +0000
+++ b/log.pl	Wed Feb 11 11:08:08 2009 +0000
@@ -20,6 +20,7 @@
 use File::Basename;
 use File::Temp qw(tempfile);
 use File::stat;
+use File::Copy;
 use Getopt::Long;
 use Mail::Mailer;
 use DBI;
@@ -244,7 +245,7 @@
     close $fh;
     close IN;
 
-    rename $file, $LOG;
+    move $file, $LOG;
 
 }