The attached text file is regarded as "diff output" by file: xvii:~> file out out: diff output, ASCII text
Control: retitle -1 buggy magic: mistakes text as diff when starting with "*** " [...] This happens when the file starts with "*** " (3 stars and a space). Checking only for these 4 characters is just silly! Two solutions: 1. Check that the second line starts with "--- " (possibly check the third line as well, and this should be sufficient). See https://en.wikipedia.org/wiki/Diff#Context_format for an example. 2. If this is too complex, remove the support for this "context" diff format, as it is more or less obsolete.
tags 744924 upstream confirmed
thanks
Vincent Lefevre wrote...
That's bad indeed. Will try to come up with a solution soon.
Christoph
This bug is still there: zira% file --version file-5.39 magic file from /etc/magic:/usr/share/misc/magic zira% echo '*** Title' | file - /dev/stdin: diff output, ASCII text The upstream bug https://bugs.astron.com/view.php?id=184 says that it is fixed in 5.39. Is there anything specific to Debian?