From f1804258a411d656b76ca42e9b405f2f26836145 Mon Sep 17 00:00:00 2001 From: Martijn van Beers <mail_dev@martijn.at> Date: Mon, 23 May 2016 17:35:27 +0200 Subject: [PATCH] Check if destination exists in _up_to_date -s $dst != -s $src isn't sufficient if you use the copy method and the source file is zero bytes long. --- bin/... | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/... b/bin/... index e395e24..8372a63 100755 --- a/bin/... +++ b/bin/... @@ -609,7 +609,7 @@ sub _up_to_date { my $dst = shift; my $method = shift; die "Error: '$src' file does not exist" unless -f $src; - return 0 if -s $dst != -s $src; + return 0 if not -e $dst or -s $dst != -s $src; if ('symlink' eq $method) { return readlink($dst) eq $src }