make sure filename uses native separators before splitting

This commit is contained in:
Stefan Bühler 2012-04-09 21:26:52 +02:00
parent e3e7c8958a
commit c696f62534

View File

@ -142,7 +142,7 @@ namespace qcross {
if (!fileName.isEmpty()) {
QDir().mkpath(QCROSS_STRING_DATAPATH);
QString newFileName = QCROSS_STRING_DATAPATH + QDir::separator() + fileName.section(QDir::separator(), -1);
QString newFileName = QCROSS_STRING_DATAPATH + QDir::separator() + QDir::toNativeSeparators(fileName).section(QDir::separator(), -1);
if (QFile::copy(fileName, newFileName))
dynamic_cast<CCrossPackageListModel *>(ui.packageList->model())->update();
else