Skip to content

Commit

Permalink
Update text_files.sp
Browse files Browse the repository at this point in the history
Fix files not being created when there is no subfolder created in sourcemod/data/
  • Loading branch information
Mart-User authored Dec 24, 2023
1 parent 2be5f22 commit 3115bbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addons/sourcemod/scripting/nd_com_dep/text_files.sp
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#define STEAMID_SIZE 32

#define DATA_FOLDER "data/com/"
#define TEXT_FILE_PATH "data/com/dep.txt"

void CreateTextFile()
{
char folderPath[PLATFORM_MAX_PATH];
BuildPath(Path_SM, folderPath, PLATFORM_MAX_PATH, DATA_FOLDER);
if (!DirExists(folderPath, false))
CreateDirectory(folderPath, 511);

/* Build a path to the text file */
char path[PLATFORM_MAX_PATH];
BuildPath(Path_SM, path, PLATFORM_MAX_PATH, TEXT_FILE_PATH);
Expand Down

0 comments on commit 3115bbf

Please sign in to comment.