From: Ian Jackson Date: Wed, 10 Oct 2018 23:23:17 +0000 (+0100) Subject: dgit: Add missing error check in single-debian-patch handling X-Git-Tag: archive/debian/8.0~47 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a8a18c8f483c03492a114aac2be5e89b8f32f5c8 dgit: Add missing error check in single-debian-patch handling We called rename here without checking the error at all. Handle ENOENT in case dpkg-source makes no patch. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 6b961f5d..e35f1681 100755 --- a/dgit +++ b/dgit @@ -5805,7 +5805,9 @@ sub quilt_fixup_singlepatch ($$$) { changedir ".."; runcmd @dpkgsource, qw(-x), (srcfn $version, ".dsc"); rename srcfn("$upstreamversion", "/debian/patches"), - "work/debian/patches"; + "work/debian/patches" + or $!==ENOENT + or confess "install d/patches: $!"; changedir "work"; commit_quilty_patch();