Skip to content

Commit

Permalink
Change name of read-only test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 authored Oct 2, 2024
1 parent 66cde0c commit 384e7f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apis/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static int fs_isReadOnly(lua_State *L) {
#ifdef WIN32
else if (e.clear(), fs::is_directory(path, e)) {
e.clear();
const path_t file = path / "a";
const path_t file = path / ".reallylongfilenamethatshouldhopefullyneverexist";
const bool didexist = fs::exists(file, e);
std::fstream fp(file, didexist ? std::ios::in : std::ios::out);
lua_pushboolean(L, !fp.is_open());
Expand Down Expand Up @@ -831,4 +831,4 @@ static luaL_Reg fs_reg[] = {
{NULL, NULL}
};

library_t fs_lib = {"fs", fs_reg, nullptr, nullptr};
library_t fs_lib = {"fs", fs_reg, nullptr, nullptr};

0 comments on commit 384e7f4

Please sign in to comment.