diff options
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/Application/UnixApplicationPathProvider.cpp | 3 | ||||
-rw-r--r-- | SwifTools/Idle/IdleDetector.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp index c5a2782..06fa977 100644 --- a/SwifTools/Application/UnixApplicationPathProvider.cpp +++ b/SwifTools/Application/UnixApplicationPathProvider.cpp @@ -25,7 +25,8 @@ UnixApplicationPathProvider::UnixApplicationPathProvider(const String& name) : A } boost::filesystem::path UnixApplicationPathProvider::getHomeDir() const { - return boost::filesystem::path(getenv("HOME")); + char* home = getenv("HOME"); + return home ? boost::filesystem::path(home) : boost::filesystem::path(); } boost::filesystem::path UnixApplicationPathProvider::getDataDir() const { diff --git a/SwifTools/Idle/IdleDetector.h b/SwifTools/Idle/IdleDetector.h index 051facc..746e281 100644 --- a/SwifTools/Idle/IdleDetector.h +++ b/SwifTools/Idle/IdleDetector.h @@ -12,7 +12,7 @@ namespace Swift { class IdleDetector { public: - IdleDetector() : idle(false) {} + IdleDetector() : idle(false), idleTimeSeconds(300) {} virtual ~IdleDetector(); void setIdleTimeSeconds(int time) { @@ -38,7 +38,7 @@ namespace Swift { } private: - int idleTimeSeconds; bool idle; + int idleTimeSeconds; }; } |