mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Updated README.md and .gitignore files
-Fixed issue where `gdpm` would to work because of missing directory -Changed `constexpr const char *` constants to use `const std::string` string instead to use with `HOME` variable -Changed where packages are stored. Now, they should stored in the user's `$HOME/.config/gdpm/packages.db` by default. This may change to use `$HOME/.cache/gdpm/packages.db` by default in the future.
This commit is contained in:
parent
2bf0186f98
commit
e36f0aee79
6 changed files with 75 additions and 58 deletions
|
|
@ -61,7 +61,10 @@ namespace gdpm::config{
|
|||
std::fstream file;
|
||||
file.open(path, std::ios::in);
|
||||
if(!file){
|
||||
log::error("Could not open file");
|
||||
if(verbose){
|
||||
log::info("No configuration file found. Creating a new one.");
|
||||
save(make_context(), verbose);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
else if(file.is_open()){
|
||||
|
|
@ -158,7 +161,7 @@ namespace gdpm::config{
|
|||
return 0;
|
||||
}
|
||||
|
||||
config_context make_config(const std::string& username, const std::string& password, const std::string& path, const std::string& token, const std::string& godot_version, const std::string& packages_dir, const std::string& tmp_dir, const std::set<std::string>& remote_sources, size_t threads, size_t timeout, bool enable_sync, bool enable_file_logging, int verbose){
|
||||
config_context make_context(const std::string& username, const std::string& password, const std::string& path, const std::string& token, const std::string& godot_version, const std::string& packages_dir, const std::string& tmp_dir, const std::set<std::string>& remote_sources, size_t threads, size_t timeout, bool enable_sync, bool enable_file_logging, int verbose){
|
||||
config_context config {
|
||||
.username = username,
|
||||
.password = password,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue