Overview
| Artifact ID: | 897e7734da52466c2c27779eb8caa0032eabbd80 |
|---|---|
| Ticket: | 40ef293eed77dd168398cab4c98b20f553f2b7fc
Path intrep invalidation triggered by [cd] too aggressive? |
| User & Date: | dgp on 2016-06-23 17:20:45 |
Changes
- assignee changed to: "dgp"
- icomment:
At its root, this is a shimmering problem that trofs code didn't take enough care to handle. Patch to trofs source code that appears to fix it: diff -u -r1.27 trofs.c --- generic/trofs.c 22 Jan 2015 17:07:00 -0000 1.27 +++ generic/trofs.c 23 Jun 2016 17:18:10 -0000 @@ -547,12 +547,22 @@ Tcl_DictObjGet(NULL, dictPtr, pathPtr, &dirPathPtr); if (NULL != dirPathPtr) { - TrofsPath *tpPtr = FetchTrofsPath(dirPathPtr); - if (NULL == tpPtr) { - Tcl_DictObjRemove(NULL, dictPtr, pathPtr); + TrofsPath *tpPtr; + + /* Remove item from cache to prevent endless loops */ + Tcl_IncrRefCount(dirPathPtr); + Tcl_IncrRefCount(pathPtr); + Tcl_DictObjRemove(NULL, dictPtr, pathPtr); + tpPtr = FetchTrofsPath(dirPathPtr); + if (tpPtr) { + *tpPtrPtr = tpPtr; + Tcl_DictObjPut(NULL, dictPtr, pathPtr, dirPathPtr); + } + Tcl_DecrRefCount(pathPtr); + Tcl_DecrRefCount(dirPathPtr); + if (tpPtr == NULL) { return NULL; } - *tpPtrPtr = tpPtr; } return dirPathPtr; } - login: "dgp"
- mimetype: "text/plain"