Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated CHANGES and version.h files for 0.04 release.
[xestiaab/.git] / source / frmNewAccount.cpp
index 3df7781..a28eefd 100644 (file)
@@ -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;
                 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy