Index: source/lib/file/file_system.cpp =================================================================== --- source/lib/file/file_system.cpp +++ source/lib/file/file_system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2022 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -27,13 +27,11 @@ #include "precompiled.h" #include "lib/file/file_system.h" -#include -#include -#include - #include "lib/sysdep/filesystem.h" +#include "ps/CLogger.h" #include +#include bool DirectoryExists(const OsPath& path) { @@ -120,7 +118,15 @@ errno = 0; const OsPath pathname = path / name; if(wstat(pathname, &s) != 0) + { + if (errno == ENOENT) + { + LOGWARNING("%s is a dangling symbolic link", + (path / name).string8().c_str()); + continue; + } WARN_RETURN(StatusFromErrno()); + } #endif if(files && S_ISREG(s.st_mode))