# | 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 | { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |