Added a fallback method to file reading so as to not create havoc
from the rigorous method of versioning in case files are relocated and the use paths are no longer valid. Cells are then searched for in the search paths in the traditional manner, albeit with a stern warning. This should avoid most backwards-compatbility issues.
This commit is contained in:
parent
2e9451ea19
commit
e991e2cfc7
|
|
@ -1025,6 +1025,24 @@ dbReadOpen(cellDef, name, setFileName, errptr)
|
|||
f = PaLockOpen(cellDef->cd_file, "r", DBSuffix, ".",
|
||||
(char *) NULL, &filename, &is_locked);
|
||||
|
||||
/* Fall back on the original method of using search paths. */
|
||||
|
||||
if (f == NULL)
|
||||
{
|
||||
f = PaLockOpen(cellDef->cd_name, "r", DBSuffix, Path,
|
||||
CellLibPath, &filename, &is_locked);
|
||||
|
||||
if (f != NULL)
|
||||
{
|
||||
TxError("Warning: Parent cell of %s marked file location as %s.\n",
|
||||
cellDef->cd_name, cellDef->cd_file);
|
||||
TxError("Cell could not be found in that location. However,"
|
||||
" the cell was found in\n");
|
||||
TxError("the search paths at %s.\n", filename);
|
||||
TxError("Please make sure that this is the intended cell version.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (errptr != NULL) *errptr = errno;
|
||||
if (pptr != NULL) *pptr = '.'; // Put it back where you found it!
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue