From 384e7f45ef69419d9ea7e6acc0be701ed0cd60f5 Mon Sep 17 00:00:00 2001 From: JackMacWindows Date: Wed, 2 Oct 2024 18:06:54 -0400 Subject: [PATCH] Change name of read-only test on Windows --- src/apis/fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apis/fs.cpp b/src/apis/fs.cpp index cc1488f4..85c3755a 100644 --- a/src/apis/fs.cpp +++ b/src/apis/fs.cpp @@ -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()); @@ -831,4 +831,4 @@ static luaL_Reg fs_reg[] = { {NULL, NULL} }; -library_t fs_lib = {"fs", fs_reg, nullptr, nullptr}; \ No newline at end of file +library_t fs_lib = {"fs", fs_reg, nullptr, nullptr};