Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checking if XDG_CONFIG_HOME/calf already exists before calling mkdir
  • Loading branch information
circled-square committed Oct 18, 2023
commit d0754f9816142b9024e59cc1d739d9bbdbd0f080
3 changes: 2 additions & 1 deletion src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,8 @@ gui_environment::gui_environment()
filename = fn_under_home;
} else {
//if $XDG_CONFIG_HOME/calf does not exist, create it
mkdir(calf_conf_dir, 0644);
if(!g_file_test(calf_conf_dir, G_FILE_TEST_EXISTS))
mkdir(calf_conf_dir, 0644);

if(g_file_test(calf_conf_dir, G_FILE_TEST_IS_DIR))
filename = fn_under_conf;
Expand Down