Update of /cvsroot/mahogany/M/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv22456/src/util
Modified Files:
upgrade.cpp
Log Message:
1. implemented --config=filename command line option support for Windows
2. changes the profile section name handling to account for this: now we
may use either Unix or Windows-style section names under Windows
Index: upgrade.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/upgrade.cpp,v
retrieving revision 1.192
retrieving revision 1.193
diff -b -u -2 -r1.192 -r1.193
--- upgrade.cpp 17 Mar 2002 15:03:53 -0000 1.192
+++ upgrade.cpp 14 Apr 2002 12:16:55 -0000 1.193
@@ -2473,6 +2473,6 @@
pathOld.clear();
pathNew.clear();
- pathOld << '/' << M_PROFILE_CONFIG_SECTION << "/Templates";
- pathNew << M_TEMPLATES_CONFIG_SECTION;
+ pathOld << '/' << Profile::GetProfilePath() << "/Templates";
+ pathNew << Profile::GetTemplatesPath();
if ( CopyEntries(config, pathOld, pathNew) == -1 )
{
@@ -3330,11 +3330,12 @@
bool rc = true;
- // the config file is supposed to be in Unix format, so we use _UNIX
- // versions of profile paths as from parameter
+ // note that the first path given to CopyEntries() is always in Unix format,
+ // while the second path should be the real path we use in our config now
+ // (may be different under Windows)
if ( READ_APPCONFIG_BOOL(MP_SYNC_FILTERS) )
{
int nFilters = CopyEntries(&fc,
- M_FILTERS_CONFIG_SECTION_UNIX,
- M_FILTERS_CONFIG_SECTION);
+ M_FILTERS_CONFIG_SECTION,
+ Profile::GetFiltersPath());
if ( nFilters == -1 )
{
@@ -3352,6 +3353,6 @@
{
int nIds = CopyEntries(&fc,
- M_IDENTITY_CONFIG_SECTION_UNIX,
- M_IDENTITY_CONFIG_SECTION);
+ M_IDENTITY_CONFIG_SECTION,
+ Profile::GetIdentityPath());
if ( nIds == -1 )
{
@@ -3370,6 +3371,6 @@
String group = READ_APPCONFIG(MP_SYNC_FOLDERGROUP);
String src, dest;
- src << M_PROFILE_CONFIG_SECTION_UNIX << '/' << group;
- dest << M_PROFILE_CONFIG_SECTION << '/' << group;
+ src << M_PROFILE_CONFIG_SECTION << '/' << group;
+ dest << Profile::GetProfilePath() << '/' << group;
int nFolders = CopyEntries(&fc, src, dest);
@@ -3499,6 +3500,6 @@
{
rc &= (CopyEntries(mApplication->GetProfile()->GetConfig(),
+ Profile::GetFiltersPath(),
M_FILTERS_CONFIG_SECTION,
- M_FILTERS_CONFIG_SECTION_UNIX,
true,
&fc) != -1);
@@ -3508,6 +3509,6 @@
{
rc &= (CopyEntries(mApplication->GetProfile()->GetConfig(),
+ Profile::GetIdentityPath(),
M_IDENTITY_CONFIG_SECTION,
- M_IDENTITY_CONFIG_SECTION_UNIX,
true,
&fc) != -1);
@@ -3518,6 +3519,6 @@
String group = READ_APPCONFIG(MP_SYNC_FOLDERGROUP);
String src, dest;
- src << M_PROFILE_CONFIG_SECTION << '/' << group;
- dest << M_PROFILE_CONFIG_SECTION_UNIX << '/' << group;
+ src << Profile::GetProfilePath() << '/' << group;
+ dest << M_PROFILE_CONFIG_SECTION << '/' << group;
rc &= (CopyEntries(mApplication->GetProfile()->GetConfig(),
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates