On Sun, Jan 18, 2026 at 09:37:36PM +0000, Gavin Smith wrote:
> On Sun, Jan 18, 2026 at 10:26:45PM +0200, Eli Zaretskii wrote:
> > > Date: Sun, 18 Jan 2026 21:01:51 +0100
> > > From: [email protected]
> > > Cc: [email protected], [email protected]
> > > 
> > > I couldn't find anything obvious, here is a patch that shows directly
> > > the option value, please apply and report the value.
> > 
> > This code from Converter.pm:
> > 
> >      if (defined($self->get_conf('SUBDIR')) and $output_file ne '') {
> >        my $dir = File::Spec->canonpath($self->get_conf('SUBDIR'));
> >        print STDERR "DFD SUBDIR: '$dir'\n";
> >        $output_file = join('/', ($dir, $output_file));
> > 
> > calls File::Spec->canonpath.  I'm pretty sure it returns file names
> > with backslashes on Windows, evidently because that's the "canonical"
> > form of file names there.
> > 
> > So we could have a customized version of canonpath, which on Windows
> > mirrors all backslashes to forward slashes.
> 
> We could solve the problem in two steps.  In texi2any:merge_open_files,
> we could call File::Spec->canonpath.  As the failing test is testing
> whether the error message is output, this should make the error message
> output.

Using a canonpath that output forward slashes only should fix the test
as the input files use forward slashes too.

However, it could be relevant to call Texinfo::Common::file_separator_canonpath
in merge_opened_files for cases where the user supplied a path with
different file separators and different paths that lead to the same
file.  The implementation of canonpath in C, however, does not do a true
file normalization, it only remove trailing path separators and merge
paths separators.

-- 
Pat

Reply via email to