Default to tasks.db in home directory

This commit is contained in:
alejo committed 2026-10-17 03:40:01 -03:00
1 parent b9557789ff
commit 4c69c164e4
5 files changed
+45 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#pragma once
#include <filesystem>
/**
* @brief Retrieves the current user's home directory across different operating systems.
*
* On Windows, it checks the USERPROFILE environment variable.
* On Unix/Linux/macOS, it checks the HOME environment variable, with a fallback
* to checking the password database entry (`getpwuid`) if HOME is unset.
*
* @return std::filesystem::path Path to the user's home directory, or an empty path if unable to resolve.
*/
std::filesystem::path getHomeDirectory();