From 594fe9b1bef52f1be053e8fd7b8ae6176455bd78 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 23 Feb 2017 22:01:53 -0800 Subject: [PATCH] Use hashes of URLs for filenames, due to length constraints --- libraries/model/src/model/TextureMap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/model/src/model/TextureMap.cpp index 7b2e363eff..ce602b7b9b 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/model/src/model/TextureMap.cpp @@ -18,7 +18,7 @@ #include #include #include - +#include #include #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;