File: fix-add-header

package info (click to toggle)
libfixbuf 2.4.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,024 kB
  • sloc: xml: 16,971; ansic: 14,447; perl: 338; makefile: 152; sh: 10
file content (31 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Johannes 'josch' Schauer <josch@debian.org>
Date: Tue, 24 Sep 2019 17:55:37 +0200
Subject: use "move" instead of "rename" to support cross device renames

---
 doc/add-header.pl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/add-header.pl b/doc/add-header.pl
index 4fed0f1..6b273df 100755
--- a/doc/add-header.pl
+++ b/doc/add-header.pl
@@ -34,6 +34,7 @@
 use warnings;
 use strict;
 use File::Temp  qw//;
+use File::Copy;
 
 my $NAME = $0;
 $NAME =~ s,.*/,,;
@@ -56,8 +57,8 @@ close OLD;
 close NEW
     or die "$NAME: Cannot close '$new': $!\n";
 
-rename $new, $old
-    or die "$NAME: Cannot rename '$old' to '$new': $!\n";
+move $new, $old
+    or die "$NAME: Cannot move '$old' to '$new': $!\n";
 
 exit;