diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp index 3fca858..64c1e7c 100644 --- a/sago/platform_folders.cpp +++ b/sago/platform_folders.cpp @@ -112,10 +112,10 @@ static void throwOnRelative(const char* envName, const char* envValue) { } /** - * Retrives the effective user's home dir. - * If the user is running as root we ignore the HOME environment. It works badly with sudo. + * Retrives the effective user's home dir. + * If the user is running as root we ignore the HOME environment. It works badly with sudo. * Writing to $HOME as root implies security concerns that a multiplatform program cannot be assumed to handle. - * @return The home directory. HOME environment is respected for non-root users if it exists. + * @return The home directory. HOME environment is respected for non-root users if it exists. */ static std::string getHome() { std::string res; @@ -260,7 +260,7 @@ static void PlatformFoldersFillData(std::map& folders) folders["XDG_TEMPLATES_DIR"] = "$HOME/.Templates"; folders["XDG_VIDEOS_DIR"] = "$HOME/Videos"; PlatformFoldersAddFromFile( getConfigHome()+"/user-dirs.dirs", folders); - for (std::map::iterator itr = folders.begin() ; itr != folders.end() ; itr ++ ) { + for (std::map::iterator itr = folders.begin() ; itr != folders.end() ; ++itr ) { std::string& value = itr->second; if (value.compare(0, 5, "$HOME") == 0) { value = getHome() + value.substr(5, std::string::npos); diff --git a/sago/platform_folders.h b/sago/platform_folders.h index 4c85283..fc7cade 100644 --- a/sago/platform_folders.h +++ b/sago/platform_folders.h @@ -2,7 +2,7 @@ Its is under the MIT license, to encourage reuse by cut-and-paste. The original files are hosted here: https://github.com/sago007/PlatformFolders - + Copyright (c) 2015 Poul Sander Permission is hereby granted, free of charge, to any person @@ -162,11 +162,14 @@ public: private: PlatformFolders(const PlatformFolders&); PlatformFolders& operator=(const PlatformFolders&); +#if defined(_WIN32) +#elif defined(__APPLE__) +#else struct PlatformFoldersData; PlatformFoldersData *data; +#endif }; } //namespace sago #endif /* PLATFORM_FOLDERS_H */ -