Remove UUID from history path and move .cache to AppData/Roaming for Windows

This commit is contained in:
Yuriy Puchkov
2020-08-03 15:05:20 +03:00
parent 434ee50b12
commit cc0175487c
3 changed files with 5 additions and 16 deletions

View File

@@ -9,8 +9,11 @@ History::History()
{
// Get cache history path
ConfigHandler config;
QString userUuid = config.userUuid();
m_historyPath = QDir::homePath() + "/.cache/flameshot/history/"+ userUuid + "/";
#ifdef Q_OS_WIN
m_historyPath = QDir::homePath() + "/AppData/Roaming/flameshot/history/";
#else
m_historyPath = QDir::homePath() + "/.cache/flameshot/history/";
#endif
// Check if directory for history exists and create if doesn't
QDir dir = QDir(m_historyPath);