Michael Gerz wrote:
> In buffer::save(), removeAutosaveFile() is invoked with a Windows (i.e.
> non-POSIX) absolute file name.However, onlyPath() which is called from
> removeAutosaveFile() can only handle "/" (not "\").
>
> I guess it is not onlyPath() to blame. I guess some external filename
> isn't converted properly into an internal filename, right?
Exactly. All LyX filename handling assumes paths with /, not \, so all
filenames coming from external sources (command line, config files, file
dialog) need to be converted to internal paths.
With the attached patch it should be easy to find out where this comes from.
Georg
Index: src/support/filename.C
===================================================================
--- src/support/filename.C (Revision 16123)
+++ src/support/filename.C (Arbeitskopie)
@@ -42,6 +42,7 @@ FileName::FileName(string const & abs_fi
: name_(abs_filename)
{
BOOST_ASSERT(absolutePath(name_));
+ BOOST_ASSERT(!contains(name_, '\\'));
}
@@ -49,6 +50,7 @@ void FileName::set(string const & name)
{
name_ = name;
BOOST_ASSERT(absolutePath(name_));
+ BOOST_ASSERT(!contains(name_, '\\'));
}