Improve seperator function

This commit is contained in:
Transporter 2024-01-21 20:25:01 +01:00
parent ad59d9149e
commit f2350d9739
1 changed files with 3 additions and 6 deletions

View File

@ -7,6 +7,7 @@
##############################################################################*/
#include "qtkiosystem.h"
#include <QDir>
using namespace Qtk;
@ -19,15 +20,11 @@ bool QtkIOSystem::Exists(const char * pFile) const {
}
char QtkIOSystem::getOsSeparator() const {
#ifndef _WIN32
return '/';
#else
return '\\';
#endif
return QDir::separator().toLatin1();
}
Assimp::IOStream * QtkIOSystem::Open(const char * pFile, const char * pMode) {
if(!QFileInfo::exists(pFile)) {
if(!Exists(pFile)) {
qDebug() << "[Qtk::QtkIOSystem] failed to open file: " << pFile << "\n";
return nullptr;
}