mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Implement --debugger option to improve UX when debugging crashes (#13157)
This commit is contained in:
parent
6f5703baf1
commit
87d509e462
7 changed files with 193 additions and 17 deletions
|
@ -127,6 +127,12 @@ bool IsDir(const std::string &path)
|
|||
(attr & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
bool IsExecutable(const std::string &path)
|
||||
{
|
||||
DWORD type;
|
||||
return GetBinaryType(path.c_str(), &type) != 0;
|
||||
}
|
||||
|
||||
bool IsDirDelimiter(char c)
|
||||
{
|
||||
return c == '/' || c == '\\';
|
||||
|
@ -309,6 +315,11 @@ bool IsDir(const std::string &path)
|
|||
return ((statbuf.st_mode & S_IFDIR) == S_IFDIR);
|
||||
}
|
||||
|
||||
bool IsExecutable(const std::string &path)
|
||||
{
|
||||
return access(path.c_str(), X_OK) == 0;
|
||||
}
|
||||
|
||||
bool IsDirDelimiter(char c)
|
||||
{
|
||||
return c == '/';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue