Skip to content

Commit 9c46c56

Browse files
auto-create logs folder if not created
1 parent f431a06 commit 9c46c56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

helpers/evil_portal_storage.c

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ char *sequential_file_resolve_path(Storage *storage, const char *dir,
9797
void write_logs(char *portal_logs) {
9898
Storage *storage = evil_portal_open_storage();
9999

100+
if(!storage_file_exists(storage, EVIL_PORTAL_LOG_SAVE_PATH)) {
101+
storage_simply_mkdir(storage, EVIL_PORTAL_LOG_SAVE_PATH);
102+
}
103+
100104
char *seq_file_path = sequential_file_resolve_path(
101105
storage, EVIL_PORTAL_LOG_SAVE_PATH, "log", "txt");
102106

0 commit comments

Comments
 (0)