diff --git a/src/AssetCache.cpp b/src/AssetCache.cpp index 974823f..39b953b 100644 --- a/src/AssetCache.cpp +++ b/src/AssetCache.cpp @@ -79,12 +79,12 @@ If not, the function will traverse the full hierarchy of the given directory and */ int AssetCache::fromDir(const char *dir) { char cachepath[1024]; + directory.assign(dir); #ifndef _WIN32 sprintf(cachepath, "%s/.CACHE", dir); #else sprintf_s(cachepath, 1024, "%s/.CACHE", dir); #endif - directory.assign(dir); if (fromFile(cachepath) != 0) { LOG(LOG_INFO) << FUNC_NAME << ": " << cachepath << " does not exist"; }