Clarify logic for testing writeability with faketestfile_69.replay (#1217)

* Update replay-stocks.sp

* Update replay-stocks.sp

XDDD

* Update replay-stocks.sp

ecksdee.

* Update replay-stocks.sp

f.. you

* Update replay-stocks.sp

hucvfrsdtbh
This commit is contained in:
Nairda 2024-09-23 03:36:25 +02:00 committed by GitHub
parent fee7df2919
commit 1b67644197
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,13 +86,18 @@ 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); FormatEx(sPath, sizeof(sPath), "%s/0/faketestfile_69.replay", sReplayFolder);
File fTest = OpenFile(sPath, "wb+"); File fTest = OpenFile(sPath, "wb+");
CloseHandle(fTest);
// Check if the file was opened successfully for writing
if (fTest == null) if (fTest == null)
{ {
SetFailState("Failed to write to replay folder (%s). Make sure you have file permissions.", sReplayFolder); SetFailState("Failed to write to replay folder (%s). Make sure you have file permissions.", sReplayFolder);
} }
else
{
// File was opened successfully, now close it
CloseHandle(fTest);
}
} }