From 42fadd42c4ddc19b1602380b7fbe0b2a74c06e64 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 5 Jan 2010 19:37:49 +0000 Subject: [PATCH] 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 --- src/support/filetools.cpp | 19 +++++++++++-------- status.16x | 2 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 3eae80d8a2..1615c38777 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -129,15 +129,18 @@ string const quoteName(string const & name, quote_style style) { switch(style) { case quote_shell: - // This does not work for filenames containing " (windows) - // or ' (all other OSes). This can't be changed easily, since - // we would need to adapt the command line parser in - // Forkedcall::generateChild. 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. + // This does not work on native Windows for filenames + // containing the following characters < > : " / \ | ? * + // Moreover, it can't be made to work, as, according to + // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx + // those are reserved characters, and thus are forbidden. + // Please, also note that the command-line parser in + // 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) ? - '\'' + name + '\'': + '\'' + subst(name, "'", "\'\\\'\'") + '\'' : '"' + name + '"'; case quote_python: return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"") diff --git a/status.16x b/status.16x index f992169e81..f00d784da4 100644 --- a/status.16x +++ b/status.16x @@ -75,6 +75,8 @@ What's new - Fix the import of tex files with multi-byte characters in the preamble (bug 6365). +- Allow using single quotes in filenames (bug 6415). + * USER INTERFACE