diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index da24bb3b8f27bc68442068f977798be98d4e7227..662d2df5d2a7192b0d2db9e4fd574bbf84bf27af 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -646,6 +646,9 @@ void LLFloaterPreference::cancel()
 		LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get();
 		pPathfindingConsole->onRegionBoundaryCross();
 	}
+
+	std::string dir_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
+	updateLogLocation(dir_name);
 }
 
 void LLFloaterPreference::onOpen(const LLSD& key)
@@ -1443,16 +1446,20 @@ void LLFloaterPreference::onClickLogPath()
 
 	std::string dir_name = picker.getDirName();
 	gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name);
+	updateLogLocation(dir_name);
 	
+	// enable/disable 'Delete transcripts button
+	updateDeleteTranscriptsButton();
+}
+
+void LLFloaterPreference::updateLogLocation(const std::string& dir_name)
+{
 	gDirUtilp->setChatLogsDir(dir_name);
 	gDirUtilp->updatePerAccountChatLogsDir();
 	LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
 
 	// refresh IM floaters with new logs from files from new selected directory
 	LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true);
-
-	// enable/disable 'Delete transcripts button
-	updateDeleteTranscriptsButton();
 }
 
 void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email)
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index f9f1d5224428c2891880a8d36e1364f1345c653f..dbd87f74a19bf0cad4989c7ed8aac2445772dc4f 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -142,7 +142,8 @@ class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver,
 	void onClickDisablePopup();	
 	void resetAllIgnored();
 	void setAllIgnored();
-	void onClickLogPath();	
+	void onClickLogPath();
+	void updateLogLocation(const std::string& dir_name);
 	void enableHistory();
 	void setPersonalInfo(const std::string& visibility, bool im_via_email);
 	void refreshEnabledState();