X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2FfrmNewAccount.cpp;h=a28eefdca63d90e9a40d77cf3cb5388528371ac0;hb=f465aa76237915dfa58983da02e2ea0707ef0d07;hp=3df77811aa338c3fed2302d9621b35e66506ce77;hpb=c5bc76b6a1301ce594a0949f02855a6bc2190094;p=xestiaab%2F.git diff --git a/source/frmNewAccount.cpp b/source/frmNewAccount.cpp index 3df7781..a28eefd 100644 --- a/source/frmNewAccount.cpp +++ b/source/frmNewAccount.cpp @@ -338,6 +338,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) // Finished. wxString XestiaABPrefDirectory; + wxString XestiaABDirectory; wxString AccountSettingsFile; //wxFile ASFile; wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767); @@ -349,8 +350,9 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) #elif defined(__WIN32__) - XestiaABPrefDirectory = GetUserDir(); - + XestiaABPrefDirectory = GetUserPrefDir(); + XestiaABDirectory = GetUserDir(); + AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts"); // Open the file for writing. @@ -385,7 +387,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix; - if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){ + if (wxMkdir(XestiaABDirectory + wxT("\\accounts\\") + DirectoryName + wxT(".carddav"), 0740) == TRUE){ DirectoryCreated = TRUE; @@ -408,7 +410,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix; - if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){ + if (wxMkdir(XestiaABDirectory + wxT("\\accounts\\") + DirectoryName + wxT(".local"), 0740) == TRUE){ DirectoryCreated = TRUE; @@ -434,9 +436,10 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) #else - XestiaABPrefDirectory = GetUserDir(); + XestiaABPrefDirectory = GetUserPrefDir(); + XestiaABDirectory = GetUserDir(); - AccountSettingsFile = GetUserPrefDir() + wxT("accounts"); + AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts"); // Open the file for writing. @@ -470,7 +473,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix; - if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){ + if (wxMkdir(XestiaABDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){ DirectoryCreated = TRUE; @@ -493,7 +496,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix; - if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){ + if (wxMkdir(XestiaABDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){ DirectoryCreated = TRUE;