mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
fix bug 4693, Exporting files doesn't create the files in the correct folder
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26718 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7b6bf2ec9b
commit
e3a494d322
@ -121,6 +121,23 @@ struct FileName::Private
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString longPathName(QString const & path)
|
||||||
|
{
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
|
return path;
|
||||||
|
#else
|
||||||
|
if (path.isEmpty()) {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
QString maybeShort = QDir::toNativeSeparators(path);
|
||||||
|
QByteArray shortName = maybeShort.toLocal8Bit();;
|
||||||
|
char longPath[MAX_PATH];
|
||||||
|
int err = GetLongPathName(shortName.constData(), longPath, MAX_PATH);
|
||||||
|
(void)err;
|
||||||
|
return QDir::fromNativeSeparators(QString::fromLocal8Bit(longPath));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
QFileInfo fi;
|
QFileInfo fi;
|
||||||
};
|
};
|
||||||
@ -426,7 +443,7 @@ FileName FileName::getcwd()
|
|||||||
|
|
||||||
FileName FileName::tempPath()
|
FileName FileName::tempPath()
|
||||||
{
|
{
|
||||||
return FileName(fromqstr(QDir::tempPath()));
|
return FileName(fromqstr(Private::longPathName(QDir::tempPath())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user