Commit 82d9ee5d authored by Chris Lamb's avatar Chris Lamb 💬

Call file(1) with the "--" argument placeholder to fix normalisation of files...

Call file(1) with the "--" argument placeholder to fix normalisation of files starting with a hyphen. (Closes: #6, #924407)
parent 1ccc8241
......@@ -35,7 +35,7 @@ sub init() {
sub _get_file_type($) {
my $file=shift;
open(FILE, '-|') # handle all filenames safely
|| exec('file', $file)
|| exec('file', '--', $file)
|| die "can't exec file: $!";
my $type=<FILE>;
close FILE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment