Fix bug #4063: LyX cannot handle apostrophe characters ' in path names

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32773 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-01-05 19:37:49 +00:00
parent 0b5c946f9b
commit 42fadd42c4
2 changed files with 13 additions and 8 deletions

View File

@ -129,15 +129,18 @@ string const quoteName(string const & name, quote_style style)
{ {
switch(style) { switch(style) {
case quote_shell: case quote_shell:
// This does not work for filenames containing " (windows) // This does not work on native Windows for filenames
// or ' (all other OSes). This can't be changed easily, since // containing the following characters < > : " / \ | ? *
// we would need to adapt the command line parser in // Moreover, it can't be made to work, as, according to
// Forkedcall::generateChild. Therefore we don't pass user // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
// filenames to child processes if possible. We store them in // those are reserved characters, and thus are forbidden.
// a python script instead, where we don't have these // Please, also note that the command-line parser in
// limitations. // ForkedCall::generateChild cannot deal with filenames
// containing " or ', therefore we don't pass user filenames
// to child processes if possible. We store them in a python
// script instead, where we don't have these limitations.
return (os::shell() == os::UNIX) ? return (os::shell() == os::UNIX) ?
'\'' + name + '\'': '\'' + subst(name, "'", "\'\\\'\'") + '\'' :
'"' + name + '"'; '"' + name + '"';
case quote_python: case quote_python:
return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"") return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"")

View File

@ -75,6 +75,8 @@ What's new
- Fix the import of tex files with multi-byte characters in - Fix the import of tex files with multi-byte characters in
the preamble (bug 6365). the preamble (bug 6365).
- Allow using single quotes in filenames (bug 6415).
* USER INTERFACE * USER INTERFACE