bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: install-info mishandles file names containing spaces


From: Eli Zaretskii
Subject: Re: install-info mishandles file names containing spaces
Date: Sat, 15 Feb 2014 09:33:16 +0200

> Date: Fri, 14 Feb 2014 21:53:02 -0800
> From: Paul Eggert <address@hidden>
> 
> I ran into this problem when using Texinfo 5.2 to install GNU Emacs into 
> a destination directory whose file name contained spaces.  The shell 
> command:
> 
> install-info --info-dir="/d/a b/info" "/d/a b/info/emacs.info.gz"
> 
> failed with the diagnostic "sh: /d/a: No such file or directory".
> 
> I'm attaching a proposed patch.
> 
> [2:text/plain Hide Save:install-info.diff (6kB)]
> 
> Index: ChangeLog
> ===================================================================
> --- ChangeLog (revision 5412)
> +++ ChangeLog (working copy)
> @@ -1,3 +1,13 @@
> +2014-02-14  Paul Eggert  <address@hidden>
> +
> +     * install-info/install-info.c (open_possibly_compressed_file):
> +     Work even if the file name contains arbitrary shell
> +     metacharacters.  Do this by running the decompressor on standard
> +     input, rather than by having the shell open the file.
> +     Return either stdin or a pipe.
> +     Don't bother with IS_PIPE arg; no longer needed.
> +     All callers changed.  Check for freopen failure.

Isn't it easier to simply quote the file name in the command used by
'popen'?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]