Skip to content

Commit

Permalink
Update replay-stocks.sp
Browse files Browse the repository at this point in the history
  • Loading branch information
Nairdaa authored Aug 17, 2024
1 parent 2a23c05 commit b2c1880
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/sourcemod/scripting/include/shavit/replay-stocks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,16 @@ stock void Shavit_Replay_CreateDirectories(const char[] sReplayFolder, int style
}
}

// Test to see if replay file creation even works...
// Test to see if replay file creation works
FormatEx(sPath, sizeof(sPath), "%s/0/faketestfile_69.replay", sReplayFolder);
File fTest = OpenFile(sPath, "wb+");
CloseHandle(fTest);

// Check if file was opened successfully before closing
if (fTest == null)
{
SetFailState("Failed to write to replay folder (%s). Make sure you have file permissions.", sReplayFolder);
}
}
else
{
CloseHandle(fTest);
}

0 comments on commit b2c1880

Please sign in to comment.