3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-17 12:45:44 +00:00

Merge branch 'YosysHQ:main' into main

This commit is contained in:
Akash Levy 2025-05-20 00:58:47 -07:00 committed by GitHub
commit c0e3ffa2da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -251,7 +251,15 @@ bool check_is_directory(const std::string& dirname)
{
#if defined(_WIN32)
struct _stat info;
if (_stat(dirname.c_str(), &info) != 0)
auto dirname_ = dirname;
/* On old versions of Visual Studio and current versions on MinGW,
_stat will fail if the path ends with a trailing slash. */
if (dirname.back() == '/' || dirname.back() == '\\') {
dirname_ = dirname.substr(0, dirname.length() - 1);
}
if (_stat(dirname_.c_str(), &info) != 0)
{
return false;
}