From f1f91c2ebd310c43f634b61c044f443db47c34c5 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 22 Oct 2012 18:26:55 -0400 Subject: [PATCH] resolve files case-insensitively on Linux if a case-sensitive search did not succeed (to handle Mitsuba scenes that work perfectly fine on Windows/OSX) --- src/libcore/fresolver.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/libcore/fresolver.cpp b/src/libcore/fresolver.cpp index 8010f024..b32d53d0 100644 --- a/src/libcore/fresolver.cpp +++ b/src/libcore/fresolver.cpp @@ -85,11 +85,32 @@ void FileResolver::appendPath(const fs::path &path) { } fs::path FileResolver::resolve(const fs::path &path) const { + /* First, try to resolve in case-sensitive mode */ for (size_t i=0; ipath().filename().string()) == filename) + return it->path(); + } + } + #endif + return path; }