Changeset 746 for trunk/gsdl/src


Ignore:
Timestamp:
1999-10-26T11:29:32+13:00 (25 years ago)
Author:
sjboddie
Message:

receptionist now checks collect diectory for collections
rather than collections.txt file

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/librarymain.cpp

    r722 r746  
    2828/*
    2929   $Log$
     30   Revision 1.18  1999/10/25 22:29:31  sjboddie
     31   receptionist now checks collect diectory for collections
     32   rather than collections.txt file
     33
    3034   Revision 1.17  1999/10/19 03:23:43  davidb
    3135   Collection building support through web pages
     
    98102#include "mgsearch.h"
    99103#include "mggdbmsource.h"
     104#include "fileutil.h"
    100105#include <assert.h>
    101106
     
    127132
    128133  text_tarray collections;
    129 
    130   ifstream collist (GSDL_GSDLHOME "/etc/collections.txt");
    131   if (!collist) {
    132     exit(1);
    133   }
    134   char collection[100];
    135   while (!collist.eof()) {
    136     collist.getline (collection, 100);
    137     if (collection[0] != '\0')
    138       collections.push_back (collection);
    139   }
    140   collist.close();
     134  if (!read_dir (GSDL_GSDLHOME "/collect", collections)) exit (1);
    141135
    142136  text_tarray::const_iterator thiscol = collections.begin();
     
    144138
    145139  while (thiscol != endcol) {
     140
     141    // ignore the modelcol
     142    if (*thiscol == "modelcol") {
     143      thiscol ++;
     144      continue;
     145    }
    146146
    147147    // this memory is created but never destroyed
  • trunk/gsdl/src/recpt/nullproto.cpp

    r722 r746  
    2828/*
    2929   $Log$
     30   Revision 1.11  1999/10/25 22:29:32  sjboddie
     31   receptionist now checks collect diectory for collections
     32   rather than collections.txt file
     33
    3034   Revision 1.10  1999/10/19 03:23:43  davidb
    3135   Collection building support through web pages
     
    117121           << configinfo.gsdlhome << "\"\n";
    118122    //  return false; //****
     123    here ++;
     124    continue;
    119125      }
    120126
     
    123129    outconvertclass text_t2ascii;
    124130    logout << text_t2ascii
    125            << "Error: couldn't read collect.cfg file for collection \""
     131           << "Warning: couldn't read collect.cfg file for collection \""
    126132           << configinfo.collection << "\", gsdlhome=\""
    127133           << configinfo.gsdlhome << "\"\n";
    128     return false;
     134    //  return false; //****
     135    here ++;
     136    continue;
    129137      }
    130138
Note: See TracChangeset for help on using the changeset viewer.