Exclude macOS metadata
This commit is contained in:
@@ -64,6 +64,8 @@ void ApplyAllCustomPatches()
|
||||
try {
|
||||
for (std::filesystem::path p : std::filesystem::directory_iterator("patches"))
|
||||
{
|
||||
if (std::filesystem::path(p).filename().string()._Starts_with("._")) continue; // exclude macOS metadata
|
||||
|
||||
std::string extension = std::filesystem::path(p).extension().string();
|
||||
if ((extension == ".p" || extension == ".P" || extension == ".p2" || extension == ".P2"))
|
||||
{
|
||||
|
||||
@@ -220,6 +220,8 @@ void FindFiles(WIN32_FIND_DATAW* fd)
|
||||
do {
|
||||
if (!(fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
if (fd->cFileName[0] == '.' && fd->cFileName[1] == '_') continue; // exclude macOS metadata
|
||||
|
||||
if (!_wcsicmp(fd->cFileName, L"Patches.dva") || !_wcsicmp(fd->cFileName, L"Render.dva"))
|
||||
{
|
||||
DeleteFileW(fd->cFileName);
|
||||
|
||||
Reference in New Issue
Block a user