Commit b5aa0014 authored by claes's avatar claes

Bugfix when listfile not found

parent bf1ccb00
/*
* Proview $Id: wb_pvd_gvl.cpp,v 1.2 2005-10-25 12:04:25 claes Exp $
* Proview $Id: wb_pvd_gvl.cpp,v 1.3 2005-11-22 12:24:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -41,7 +41,7 @@ void wb_pvd_gvl::save( pwr_tStatus *sts)
pwr_tFileName fname;
*sts = LDH__SUCCESS;
dcli_translate_filename( fname, "$pwra_db/pwr_volumelist.tst");
dcli_translate_filename( fname, "$pwra_db/pwr_volumelist.dat");
of.open( fname);
if ( !of) {
*sts = LDH__FILEOPEN;
......@@ -96,13 +96,6 @@ void wb_pvd_gvl::load( pwr_tStatus *rsts)
*rsts = LDH__SUCCESS;
dcli_translate_filename( fname, "$pwra_db/pwr_volumelist.tst");
is.open( fname);
if ( !is) {
*rsts = LDH__NEWFILE;
return;
}
// Create Root object
pitem rootitem;
strcpy( rootitem.name, "GlobalVolumeList");
......@@ -112,6 +105,12 @@ void wb_pvd_gvl::load( pwr_tStatus *rsts)
menu_stack[menu_cnt] = rootitem.oix;
menu_cnt++;
dcli_translate_filename( fname, "$pwra_db/pwr_volumelist.dat");
is.open( fname);
if ( !is) {
*rsts = LDH__NEWFILE;
return;
}
while ( is.getline( line, sizeof(line))) {
line_cnt++;
......
/*
* Proview $Id: wb_pvd_pl.cpp,v 1.4 2005-11-15 15:42:57 claes Exp $
* Proview $Id: wb_pvd_pl.cpp,v 1.5 2005-11-22 12:25:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -505,12 +505,6 @@ void wb_pvd_pl::load( pwr_tStatus *rsts)
*rsts = LDH__SUCCESS;
dcli_translate_filename( fname, "$pwra_db/pwr_projectlist.dat");
is.open( fname);
if ( !is) {
*rsts = LDH__NEWFILE;
return;
}
// Create Root object
pitem rootitem;
......@@ -531,6 +525,12 @@ void wb_pvd_pl::load( pwr_tStatus *rsts)
m_list[rootitem.oix].lchoix = brootitem.oix;
m_list.push_back(brootitem);
dcli_translate_filename( fname, "$pwra_db/pwr_projectlist.dat");
is.open( fname);
if ( !is) {
*rsts = LDH__NEWFILE;
return;
}
while ( is.getline( line, sizeof(line))) {
line_cnt++;
......
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