Feature/user profiles assets (#1496)

* added user profile/asset tokens to config, launcher and profile editor


* creating one user directory for data, config, screenshots, recordings
This commit is contained in:
Micah Acinapura
2021-03-02 01:36:32 -05:00
committed by GitHub
parent 157ffff25b
commit eec6b15781
17 changed files with 178 additions and 42 deletions
+15 -1
View File
@@ -49,6 +49,10 @@
#include <ghoul/misc/profiling.h>
#include <iomanip>
#ifdef WIN32
#include <windows.h>
#endif // WIN32
namespace {
constexpr const char* _loggerCat = "SessionRecording";
@@ -1713,7 +1717,17 @@ std::vector<std::string> SessionRecording::playbackList() const {
std::vector<std::string> allInputFiles = currentDir.readFiles();
for (const std::string& f : allInputFiles) {
// Remove path and keep only the filename
fileList.push_back(f.substr(path.length() + 1, f.length() - path.length() - 1));
const std::string filename = f.substr(path.length() + 1, f.length() - path.length() - 1);
bool isHidden = false;
#ifdef WIN32
DWORD attributes = GetFileAttributes(f.c_str());
isHidden = attributes & FILE_ATTRIBUTE_HIDDEN;
#else
isHidden = filename.rfind(".", 0) != 0;
#endif // WIN32
if (!isHidden) { //Don't add hidden files
fileList.push_back(filename);
}
}
return fileList;
}