Peter Kümmel wrote:
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:

What about this patch?
Index: support/FileName.cpp
===================================================================
--- support/FileName.cpp        (revision 26651)
+++ support/FileName.cpp        (working copy)
@@ -257,7 +257,8 @@
 {
        // 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());
+       QString path = d->fi.absoluteFilePath();
+       QByteArray const encoded = 
QFile::encodeName(QDir::toNativeSeparators(path));
        return string(encoded.begin(), encoded.end());
 }
 
@@ -265,7 +266,8 @@
 FileName FileName::fromFilesystemEncoding(string const & name)
 {
        QByteArray const encoded(name.c_str(), name.length());
-       return FileName(fromqstr(QFile::decodeName(encoded)));
+       QString path = QDir::fromNativeSeparators(QFile::decodeName(encoded));
+       return FileName(fromqstr(path));
 }
 
 

Reply via email to