Commit 052a024d authored by Claes Sjofors's avatar Claes Sjofors

Dbs files for classvolumes always loaded before other volumes

parent 33f46c23
......@@ -529,7 +529,7 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
char fname[200];
char vname[200];
char line[200];
int i;
int i, j;
pwr_tVid vid;
pwr_tStatus sts;
wb_vrepdbs *vrep;
......@@ -538,6 +538,8 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
strcpy( fname, load_cNameVolumeList);
dcli_translate_filename( fname, fname);
// Load classvolumes first (j == 0) and then other volumes (j == 1)
for ( j = 0; j < 2; j++) {
ifstream fpm( fname, ios::in);
if ( !fpm) {
*status = LDH__PROJCONFIG;
......@@ -574,6 +576,7 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
cdh_StringToVolumeId( vol_array[1], &vid);
if ( cdh_NoCaseStrcmp( vol_array[2], "ExternVolume") == 0) {
if ( j == 1) {
if ( nr != 6)
cout << "Syntax error in file: " << fname << endl;
......@@ -590,9 +593,11 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
MsgWindow::message( 'E', "Unable to open volume", vname, e.what().c_str());
}
}
}
else if ( cdh_NoCaseStrcmp( vol_array[2], "ClassVolume") == 0 ||
cdh_NoCaseStrcmp( vol_array[2], "DetachedClassVolume") == 0 ||
strcmp( vol_array[3], "load") == 0) {
if ( j == 0) {
if ( nr < 4)
cout << "Syntax error in file: " << fname << endl;
......@@ -668,7 +673,9 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
MsgWindow::message( 'E', "Volume snapshotfile not found", vname);
}
}
}
else {
if ( j == 1) {
// Load db for this volume
char uname[80];
......@@ -793,7 +800,9 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
}
}
}
}
fpm.close();
}
// Identify dbs that also is loaded as db
vrep_iterator itdbs, itdb;
......@@ -850,6 +859,7 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
addDb( &sts, vrepdb);
MsgWindow::message( 'I', "Database opened", vname);
}
if ( !vol_cnt)
*status = LDH__PROJCONFIG;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment