From c18e2f74b0f98bc772cb4cdcda17e598971b8b62 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Tue, 26 Apr 2011 22:22:33 +0200 Subject: STORM-1182 Use string::rfind instead of string::find ... so the last occurance of the build prefix in the executable path will be matched. This should avoid cuttung too much subdirs away if someone checks out the source to a path already containing "/build-darwin-" or "/build-linux-". --- indra/llvfs/lldir_mac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llvfs/lldir_mac.cpp') diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index e862ef0d84..f9369b043e 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,7 +150,7 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 build_dir_pos = mExecutableDir.find("/build-darwin-"); + U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout -- cgit v1.2.3