From 259919d1258292c12df0d6ea8b07d9980fa7da6b Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sun, 14 Jan 2018 00:23:29 +0000 Subject: [PATCH] Print a warning when an ambiguous file on a case-sensitive file system is found --- components/vfs/filesystemarchive.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/vfs/filesystemarchive.cpp b/components/vfs/filesystemarchive.cpp index ad5150a44..9738e2a17 100644 --- a/components/vfs/filesystemarchive.cpp +++ b/components/vfs/filesystemarchive.cpp @@ -1,5 +1,7 @@ #include "filesystemarchive.hpp" +#include + #include namespace VFS @@ -38,7 +40,8 @@ namespace VFS std::transform(proper.begin() + prefix, proper.end(), std::back_inserter(searchable), normalize_function); - mIndex.insert (std::make_pair (searchable, file)); + if (!mIndex.insert (std::make_pair (searchable, file)).second) + std::cerr << "Warning: found duplicate file for '" << proper << "', please check your file system for two files with the same name in different cases." << std::endl; } mBuiltIndex = true;