summaryrefslogtreecommitdiffstats
path: root/tools/qgltf/qgltf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qgltf/qgltf.cpp')
-rw-r--r--tools/qgltf/qgltf.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp
index 22ab5c84b..14e23939f 100644
--- a/tools/qgltf/qgltf.cpp
+++ b/tools/qgltf/qgltf.cpp
@@ -1191,12 +1191,12 @@ bool Exporter::nodeIsUseful(const Importer::Node *n) const
void Exporter::copyExternalTextures(const QString &inputFilename)
{
- // External textures need copying only when output dir was specified.
- if (!opts.outDir.isEmpty()) {
- foreach (const QString &textureFilename, m_importer->externalTextures()) {
- QString dst = opts.outDir + textureFilename;
- QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename;
- m_files.insert(QFileInfo(dst).fileName());
+ foreach (const QString &textureFilename, m_importer->externalTextures()) {
+ const QString dst = opts.outDir + textureFilename;
+ m_files.insert(QFileInfo(dst).fileName());
+ // External textures need copying only when output dir was specified.
+ if (!opts.outDir.isEmpty()) {
+ const QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename;
if (QFileInfo(src).absolutePath() != QFileInfo(dst).absolutePath()) {
if (opts.showLog)
qDebug().noquote() << "Copying" << src << "to" << dst;