Compare commits
2 Commits
d60401a181
...
e537f385e4
Author | SHA1 | Date | |
---|---|---|---|
e537f385e4 | |||
0a7e9ecee7 |
@ -51,7 +51,8 @@ enum WHY2_OUTPUT_FORMAT
|
||||
|
||||
#define WHY2_VERSION "v5.0" //WHY2_VERSION OF CURRENT BUILD > DO NOT TOUCH THIS <
|
||||
#define WHY2_VERSIONS_URL "https://raw.githubusercontent.com/ENGO150/WHY2/release/versions.json" //URL FOR GETTING versions.json
|
||||
#define WHY2_CONFIG_DIR "{HOME}/.config/WHY2"
|
||||
#define WHY2_USER_CONFIG_DIR "{HOME}/.config"
|
||||
#define WHY2_CONFIG_DIR WHY2_USER_CONFIG_DIR "/WHY2"
|
||||
#define WHY2_VERSIONS_NAME WHY2_CONFIG_DIR "/.versions.json" //do I have to explain this?
|
||||
|
||||
#define WHY2_UPDATE_URL "https://github.com/ENGO150/WHY2.git" // REPOSITORY URL FOR UPDATES (YOU DON'T SAY)
|
||||
|
@ -56,15 +56,23 @@ int removeDirectory(char *path)
|
||||
void why2_directory(void)
|
||||
{
|
||||
struct stat st;
|
||||
char *buffer_2 = why2_replace(WHY2_USER_CONFIG_DIR, "{HOME}", getenv("HOME"));
|
||||
char *buffer = why2_replace(WHY2_CONFIG_DIR, "{HOME}", getenv("HOME"));
|
||||
|
||||
//CREATE USER CONFIG FOLDER
|
||||
if (stat(buffer_2, &st) == -1)
|
||||
{
|
||||
mkdir(buffer_2, 0700);
|
||||
}
|
||||
|
||||
//CREATE WHY2 CONFIG FOLDER
|
||||
if (stat(buffer, &st) == -1)
|
||||
{
|
||||
mkdir(buffer, 0700);
|
||||
}
|
||||
|
||||
//DEALLOCATION
|
||||
why2_deallocate(buffer_2);
|
||||
why2_deallocate(buffer);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user