[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in cmdproxy.c
From: |
Klaus Berndl |
Subject: |
bug in cmdproxy.c |
Date: |
20 Feb 2001 18:44:36 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
The original version of cmdproxy is based on the fact that the "spawn"
system-call can deal with forward-slashes in path-arguments (IMHO not a good
and save approach!), but it can´t if a path-argument was quoted! Therefore we
must make all non-switch arguments canonical (means converting / to \).
Example: With the original version of cmdproxy the following would not work,
because mm-mailcap-command quotes the 'file' argument and does not convert
forward-slashes to backslashes (if this should be within this function is
another topic).
,----
| (call-process shell-file-name nil
| (setq buffer
| (generate-new-buffer "*mm*"))
| nil
| shell-command-switch
| (mm-mailcap-command
| method file (mm-handle-type handle)))
`----
(This for example is a real live example from the function
'mm-display-external' in Gnus 5.8.8)
With my patched version this works! My patch can deal with all shell-commands,
because only arguments not beginning with '/' or '-' or beginning with "//"
(for network-pathes) will be converted!
Therefore all shell-commands like
,----
| "d:/some/program.exe /S:soem-switches -s:some-other-switches
| \"D:/some/file.ext\" //host/path/to/file"
`----
will work.
The only change if have made is the cmdline-converting in lines 603-625!
OK, here is the patched version:
cmdproxy.c
Description: patched version of cmdproxy.c
Ciao,
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug in cmdproxy.c,
Klaus Berndl <=