ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/Searcher.cpp
(Generate patch)

Comparing trunk/Search/Searcher.cpp (file contents):
Revision 36 by douglas, 2003-01-02T19:42:33-08:00 vs.
Revision 37 by douglas, 2003-01-16T22:24:01-08:00

# Line 73 | Line 73 | void Searcher::search(vector<string> ind
73          {
74                  for (int index = 0; index < indices.size(); index++)
75                  {
76 <                        ifstream fin(indices[index].c_str());
76 >                        string lock = indices[index] + ".lock";
77 >
78 >                        ifstream fin(lock.c_str());
79 >
80 >                        if (fin.is_open())
81 >                        {
82 >                                cerr << program << ": Index file is locked for indexing: "
83 >                                        << indices[index] << "\n";
84 >                                fin.close();
85 >
86 >                                continue;
87 >                        }
88 >
89 >                        fin.clear();
90 >                        fin.open(indices[index].c_str());
91  
92                          if (!fin.is_open())
93                          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines