accountDirFull.Append(accountDir);
accountDirFull.Append(wxT("."));
- /*if (AccountType == wxT("CalDAV")){
+ if (accountType == wxT("CalDAV")){
- AccountDirFull.Append(wxT("local"));
+ accountDirFull.Append(wxT("CalDAV"));
- } else */
-
- if (accountType == wxT("Local")){
+ } else if (accountType == wxT("Local")){
accountDirFull.Append(wxT("Local"));
- }/*else {
-
- AccountDirFull.Append(AccountType.Lower());
-
- }*/
+ }
lstAccounts->DeleteItem(lstAccountsIndex);
// Delete the directory that contains the account information.
if (!accountDirFull.IsEmpty()){
-
+
+#if defined(__WIN32__)
+
+ accountDirDelFull.Append(GetUserDir());
+ accountDirDelFull.Append(wxT("\\accounts\\"));
+ accountDirDelFull.Append(accountDirFull);
+
+#else
+
accountDirDelFull.Append(wxString::FromUTF8(getenv("HOME")));
accountDirDelFull.Append(wxT("/.xestiacal/accounts/"));
accountDirDelFull.Append(accountDirFull);
+#endif
+
wxRmDir(accountDirDelFull);
}