mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 13:12:11 +02:00
Use hashes of URLs for filenames, due to length constraints
This commit is contained in:
parent
61e341db75
commit
594fe9b1be
1 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,7 @@
|
|||
#include <QStandardPaths>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <Profile.h>
|
||||
|
||||
#include "ModelLogging.h"
|
||||
|
@ -103,7 +103,8 @@ gpu::Texture* cacheTexture(const std::string& name, gpu::Texture* srcTexture, bo
|
|||
}
|
||||
});
|
||||
|
||||
std::string cleanedName = QUrl::toPercentEncoding(name.c_str()).toStdString();
|
||||
|
||||
std::string cleanedName = QCryptographicHash::hash(QUrl::toPercentEncoding(name.c_str()), QCryptographicHash::Sha1).toHex().toStdString();
|
||||
std::string cacheFilename(ktxCacheFolder.toStdString());
|
||||
cacheFilename += "/";
|
||||
cacheFilename += cleanedName;
|
||||
|
|
Loading…
Reference in a new issue