소스 검색

core: account for case-insensitive systems for data directories.

undefined
Sam Hocevar 11 년 전
부모
커밋
ac81bd78a2
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. +9
    -1
      src/sys/init.cpp

+ 9
- 1
src/sys/init.cpp 파일 보기

@@ -12,6 +12,8 @@
# include "config.h"
#endif

#include <cctype>

#if HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -84,7 +86,13 @@ void Init(int argc, char *argv[],
bool got_rootdir = false;
for (int i = 0; ; i++)
{
if (projectdir[i] != solutiondir[i] || projectdir[i] == '\0')
#if _WIN32
using std::toupper;
bool mismatch = toupper(projectdir[i]) != toupper(solutiondir[i]);
#else
bool mismatch = projectdir[i] != solutiondir[i];
#endif
if (mismatch || projectdir[i] == '\0')
{
/* FIXME: at this point we should check whether the binary
* was launched from this subdirectory; from now we just


불러오는 중...
취소
저장