diff options
Diffstat (limited to 'src/fs/files.cpp')
-rw-r--r-- | src/fs/files.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/fs/files.cpp b/src/fs/files.cpp index fcce1c0ea..59fd31f11 100644 --- a/src/fs/files.cpp +++ b/src/fs/files.cpp @@ -1,8 +1,9 @@ /* - * The ManaPlus Client - * Copyright (C) 2013-2019 The ManaPlus Developers + * The ManaVerse Client + * Copyright (C) 2013-2020 The ManaPlus Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -208,7 +209,7 @@ int Files::copyFile(const std::string &restrict srcName, bool Files::existsLocal(const std::string &path) { struct stat statbuf; -#ifdef WIN32 +#ifdef _WIN32 // in windows path\file.ext\ by default detected as exists // if file.ext is not directory, need return false const bool res = (stat(path.c_str(), &statbuf) == 0); @@ -220,9 +221,9 @@ bool Files::existsLocal(const std::string &path) return false; } return true; -#else // WIN32 +#else // _WIN32 return stat(path.c_str(), &statbuf) == 0; -#endif // WIN32 +#endif // _WIN32 } bool Files::loadTextFileLocal(const std::string &fileName, @@ -302,7 +303,7 @@ void Files::enumFiles(StringVect &files, const std::string file = next_file->d_name; if (file == "." || file == "..") continue; -#ifndef WIN32 +#ifndef _WIN32 if (skipSymlinks == true) { struct stat statbuf; @@ -312,7 +313,7 @@ void Files::enumFiles(StringVect &files, continue; } } -#endif // WIN32 +#endif // _WIN32 files.push_back(file); } closedir(dir); |