2008-08-20 Craig Silverstein <csilvers@google.com>
* fileread.cc (File_read::open): Do not lock the file unless it was successfully opened.
This commit is contained in:
parent
655e852974
commit
1e52a9c187
2 changed files with 7 additions and 2 deletions
|
@ -121,9 +121,9 @@ File_read::open(const Task* task, const std::string& name)
|
|||
this->size_ = s.st_size;
|
||||
gold_debug(DEBUG_FILES, "Attempt to open %s succeeded",
|
||||
this->name_.c_str());
|
||||
}
|
||||
|
||||
this->token_.add_writer(task);
|
||||
this->token_.add_writer(task);
|
||||
}
|
||||
|
||||
return this->descriptor_ >= 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue