Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d325b35
)
Fixed new account creation for Win32 using GetUserPrefDir and GetUserDir properly.
author
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Mon, 26 Oct 2015 23:51:18 +0000
(23:51 +0000)
committer
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Mon, 26 Oct 2015 23:51:18 +0000
(23:51 +0000)
source/frmNewAccount.cpp
patch
|
blob
|
history
diff --git
a/source/frmNewAccount.cpp
b/source/frmNewAccount.cpp
index
55acf26
..
a28eefd
100644
(file)
--- a/
source/frmNewAccount.cpp
+++ b/
source/frmNewAccount.cpp
@@
-338,6
+338,7
@@
void frmNewAccount::ProcessNext( wxCommandEvent& event )
// Finished.
wxString XestiaABPrefDirectory;
// Finished.
wxString XestiaABPrefDirectory;
+ wxString XestiaABDirectory;
wxString AccountSettingsFile;
//wxFile ASFile;
wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767);
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();
#elif defined(__WIN32__)
XestiaABPrefDirectory = GetUserPrefDir();
-
+ XestiaABDirectory = GetUserDir();
+
AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts");
// Open the file for writing.
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;
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
- if (wxMkdir(XestiaAB
PrefDirectory + wxT("/accounts/
") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
+ if (wxMkdir(XestiaAB
Directory + wxT("\\accounts\\
") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
DirectoryCreated = TRUE;
DirectoryCreated = TRUE;
@@
-408,7
+410,7
@@
void frmNewAccount::ProcessNext( wxCommandEvent& event )
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
- if (wxMkdir(XestiaAB
PrefDirectory + wxT("/accounts/
") + DirectoryName + wxT(".local"), 0740) == TRUE){
+ if (wxMkdir(XestiaAB
Directory + wxT("\\accounts\\
") + DirectoryName + wxT(".local"), 0740) == TRUE){
DirectoryCreated = TRUE;
DirectoryCreated = TRUE;
@@
-434,9
+436,10
@@
void frmNewAccount::ProcessNext( wxCommandEvent& event )
#else
#else
- XestiaABPrefDirectory = GetUserDir();
+ XestiaABPrefDirectory = GetUserPrefDir();
+ XestiaABDirectory = GetUserDir();
- AccountSettingsFile =
GetUserPrefDir()
+ wxT("accounts");
+ AccountSettingsFile =
XestiaABPrefDirectory
+ wxT("accounts");
// Open the file for writing.
// Open the file for writing.
@@
-470,7
+473,7
@@
void frmNewAccount::ProcessNext( wxCommandEvent& event )
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
- if (wxMkdir(XestiaAB
Pref
Directory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
+ if (wxMkdir(XestiaABDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
DirectoryCreated = TRUE;
DirectoryCreated = TRUE;
@@
-493,7
+496,7
@@
void frmNewAccount::ProcessNext( wxCommandEvent& event )
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
- if (wxMkdir(XestiaAB
Pref
Directory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){
+ if (wxMkdir(XestiaABDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){
DirectoryCreated = TRUE;
DirectoryCreated = TRUE;
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy