// Finished.
wxString XestiaABPrefDirectory;
+ wxString XestiaABDirectory;
wxString AccountSettingsFile;
//wxFile ASFile;
wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767);
#elif defined(__WIN32__)
XestiaABPrefDirectory = GetUserPrefDir();
-
+ XestiaABDirectory = GetUserDir();
+
AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts");
// Open the file for writing.
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;
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;
#else
- XestiaABPrefDirectory = GetUserDir();
+ XestiaABPrefDirectory = GetUserPrefDir();
+ XestiaABDirectory = GetUserDir();
- AccountSettingsFile = GetUserPrefDir() + wxT("accounts");
+ AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts");
// Open the file for writing.
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;
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;