X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2FfrmNewAccount.cpp;h=a28eefdca63d90e9a40d77cf3cb5388528371ac0;hb=669b99d1449d13f55ea92d174b158f5e416e7839;hp=55acf26810acdffba50478caa0b2dd8d21a90f7c;hpb=d325b3531e0ee71196f882896f3d5bc91de909c0;p=xestiaab%2F.git diff --git a/source/frmNewAccount.cpp b/source/frmNewAccount.cpp index 55acf26..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); @@ -350,7 +351,8 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) #elif defined(__WIN32__) 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;