Skip to content

Commit

Permalink
CI test attempt 12
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelwernel committed Sep 15, 2023
1 parent 124a187 commit 9f0b474
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/vmaware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ struct VM {
#endif

// check if file exists
[[nodiscard]] static bool exists(const char* path) {
#if (MSVC)
[[nodiscard]] static bool exists(LPCSTR path) {
#else
[[nodiscard]] static bool exists(const char* path) {
#endif
#if (CPP >= 17)
return std::filesystem::exists(path);
#elif (CPP >= 11)
Expand Down Expand Up @@ -1209,12 +1213,13 @@ struct VM {
TCHAR user[UNLEN+1];
DWORD user_len = UNLEN+1;
GetUserName((TCHAR*)user, &user_len);
std::string u = user;

return (
(user == "username") || // ThreadExpert
(user == "USER") || // Sandbox
(user == "user") || // Sandbox 2
(user == "currentuser") // Normal
(u == "username") || // ThreadExpert
(u == "USER") || // Sandbox
(u == "user") || // Sandbox 2
(u == "currentuser") // Normal
);
#endif
} catch (...) { return false; }
Expand Down

0 comments on commit 9f0b474

Please sign in to comment.