Index: src/ch/FolderDialog.cpp
===================================================================
diff -u -r4797e4b6b266900bfdcdf4ca6eda47c216ad9db1 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/FolderDialog.cpp	(.../FolderDialog.cpp)	(revision 4797e4b6b266900bfdcdf4ca6eda47c216ad9db1)
+++ src/ch/FolderDialog.cpp	(.../FolderDialog.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -24,7 +24,6 @@
 #include "Theme Helpers.h"
 #include "shlobj.h"
 #include "StringHelpers.h"
-#include "FileSupport.h"
 #include "TRecentPathsTools.h"
 #include "resource.h"
 #include "shortcuts.h"
@@ -35,7 +34,7 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-// dialog jako taki
+// dialog template
 const unsigned long __g_DlgTemplate[]={ 
 	0x82cf0040, 0x00000000, 0x00000000, 0x011b0000, 0x000000b4, 0x00000000, 0x00540008, 0x00680061, 
 	0x006d006f, 0x00000061 };
@@ -149,8 +148,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CFolderDialog dialog
 
-CFolderDialog::CFolderDialog(CWnd* /*pParent*/ /*=nullptr*/)
-				:ictranslate::CLanguageDialog()
+CFolderDialog::CFolderDialog(CWnd* /*pParent*/ /*=nullptr*/) :
+	ictranslate::CLanguageDialog(),
+	m_fsLocal(GetLogFileData())
 {
 	m_hImages=nullptr;
 	m_hLargeImages=nullptr;
@@ -662,12 +662,17 @@
 		if (!bSkipFreeSpace)
 		{
 			// get disk free space
-			unsigned long long ullFree, ullTotal;
-			if (GetDynamicFreeSpace(strPath, &ullFree, &ullTotal))
+			unsigned long long ullFree = 0, ullTotal = 0;
+
+			try
 			{
+				m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(strPath), ullFree, ullTotal);
 				m_strTip += GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
 				m_strTip += GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false) + _T("\n");
 			}
+			catch (const std::exception&)
+			{
+			}
 		}
 	}
 
@@ -701,12 +706,16 @@
 	m_strTip=sc.m_strName+_T("\r\n")+CString(GetResManager().LoadString(IDS_BDPATH2_STRING))+sc.m_strPath;
 
 	// get disk free space
-	unsigned long long ullFree, ullTotal;
-	if (GetDynamicFreeSpace(sc.m_strPath, &ullFree, &ullTotal))
+	unsigned long long ullFree = 0, ullTotal = 0;
+	try
 	{
-		m_strTip+=CString(_T("\r\n"))+GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
-		m_strTip+=GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false);
+		m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(sc.m_strPath), ullFree, ullTotal);
+		m_strTip += CString(_T("\r\n")) + GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
+		m_strTip += GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false);
 	}
+	catch(const std::exception&)
+	{
+	}
 
 	pit->pszText=(LPTSTR)(LPCTSTR)m_strTip;
 	pit->cchTextMax=m_strTip.GetLength()+1;