diff --git a/src/myx/filesystem/paths.cpp b/src/myx/filesystem/paths.cpp index d1fb8b4..98f1819 100644 --- a/src/myx/filesystem/paths.cpp +++ b/src/myx/filesystem/paths.cpp @@ -140,17 +140,13 @@ Paths::HierarchyType Paths::getHierarchyType() bool Paths::init( const QString& projectDir, const QString& configFileExtension ) { m_projectName = projectDir.isEmpty() ? m_currentExecutable.m_canonicalFilePath.fileName() - : projectDir; + : projectDir; m_configFileExtension = configFileExtension.isEmpty() ? QStringLiteral( "conf" ) : configFileExtension; m_configFileName = m_projectName + "." + m_configFileExtension; - m_homeDirectory = QString::fromLocal8Bit( qgetenv( "HOME" ) ); - m_tempDirectory = QString::fromLocal8Bit( qgetenv( "TMPDIR" ) ); - if ( !m_tempDirectory.exists() || ( m_tempDirectory.path() == QStringLiteral( "." ) ) ) - { - m_tempDirectory = QStringLiteral( _PATH_TMP ); - } + m_homeDirectory = QDir::homePath(); + m_tempDirectory = QDir::tempPath(); auto configHome = QString::fromLocal8Bit( qgetenv( "XDG_CONFIG_HOME" ) ); if ( configHome.isEmpty() )