diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-30 23:33:34 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-30 23:33:34 +0300 |
commit | f375e4f961eb52fa504c17e7825e832829310e8a (patch) | |
tree | 3dd7498fe7ccd918a5f36c8e480514965e1dabf7 | |
parent | b8cfe44100dbfbf6ca1dd204356cad622dcd073d (diff) |
modified: main.cpp
-rw-r--r-- | main.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -732,7 +732,17 @@ static BOOL CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(0, _T("please set keyring's home directory"), _T("Warning"), MB_OK); break; } - DBWriteContactSettingTString(NULL, szGPGModuleName, "szHomePath", tmp); + DBWriteContactSettingTString(NULL, szGPGModuleName, "szHomePath", tmp);
+ {
+ TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
+ DWORD dwFileAttr = GetFileAttributes(path);
+ if (dwFileAttr != INVALID_FILE_ATTRIBUTES)
+ {
+ dwFileAttr &=~ FILE_ATTRIBUTE_READONLY;
+ SetFileAttributes(path, dwFileAttr);
+ }
+ mir_free(path); + } DestroyWindow(hwndDlg); ShowFirstRunDialog(); break; @@ -1530,6 +1540,16 @@ void InitCheck() if(MessageBoxA(0, question.c_str(), "Own secret key warning", MB_YESNO) == IDYES) ShowFirstRunDialog(); } + {
+ TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
+ DWORD dwFileAttr = GetFileAttributes(path);
+ if (dwFileAttr != INVALID_FILE_ATTRIBUTES)
+ {
+ dwFileAttr &=~ FILE_ATTRIBUTE_READONLY;
+ SetFileAttributes(path, dwFileAttr); + } + mir_free(path); + } extern bool bAutoExchange; if(bAutoExchange && (ServiceExists("ICQ"PS_ICQ_ADDCAPABILITY))) //work only for one icq instance { |