Abdelrazak Younes wrote:

http://bugzilla.lyx.org/show_bug.cgi?id=4693
Exporting files doesn't create the files in the correct folder

I can't solve this one because I cannot reproduce it and Uwe can't debug in WinXP64 apparently. We need someone able to step by step debug this problem under WindowsXP. Otherwise we need to find a work around at the package level; like creating the prefs file at installation for the user installing.

When no Qt functions are used we have to switch between "/" and "\" manually:


Index: support/FileName.cpp
===================================================================
--- support/FileName.cpp        (revision 26651)
+++ support/FileName.cpp        (working copy)
@@ -257,7 +257,7 @@
string FileName::toFilesystemEncoding() const
 {
        // FIXME: This doesn't work on Windows for non ascii file names with Qt 
< 4.4.
        // Provided that Windows package uses Qt4.4, this isn't a problem.
-       QByteArray const encoded = QFile::encodeName(d->fi.absoluteFilePath());
+ QByteArray const encoded = QFile::encodeName(QDir::toNativeSeparators(d->fi.absoluteFilePath()));
        return string(encoded.begin(), encoded.end());
 }


For instance, when on startup the temp file is created a Windows function is 
called:


static int mymkdir(char const * pathname, unsigned long int mode)
{
...
#elif defined(_WIN32)
        // plain Windows 32
        return CreateDirectory(pathname, 0) != 0 ? 0 : -1;



Someone should check if there are more places where conversion by
QDir::toNativeSeparators or QDir::fromNativeSeparators is needed

Peter

Reply via email to