Bug#835641: diffoscope: traceback when comparing dangling symlink to directory

Brett Smith debbug at brettcsmith.org
Tue Dec 27 00:37:15 UTC 2016


Here's a patch to prevent the traceback.  It just detects the general
situation (comparing a directory with something else) and bails with a
more helpful message when they're incompatible.

I checked what diff does, and it does something slightly more nuanced:
if you compare directory D against non-directory F, it tries to compare
`/D/$(basename F)` against F.  If that directory+basename path is itself
a directory, then it bails with an error message like the one in this
patch.  Personally I felt like the path translation wasn't especially
helpful, so decided to just bail immediately.

-- 
Brett Smith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-comparators-Avoid-comparing-a-directory-with-non-dir.patch
Type: text/x-patch
Size: 2051 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20161226/b3c53fd0/attachment.bin>


More information about the Reproducible-builds mailing list