Skip to content

Commit

Permalink
Fix the build for Tcl9 and with --enable-internal-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
chpock committed Jul 27, 2024
1 parent 68e083c commit 074d8aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-06-27 Konstantin Kushnir <[email protected]>
* Fix the build for Tcl9 and with --enable-internal-debug

2024-06-27 Konstantin Kushnir <[email protected]>
* Bumped version to 1.9.0

Expand Down
12 changes: 5 additions & 7 deletions generic/fsindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,7 @@ Cookfs_FsindexEntry *Cookfs_FsindexSet(Cookfs_Fsindex *i, Cookfs_PathObj *pathOb

CookfsLog(printf("Cookfs_FsindexSet - start"))

CookfsLog(printf("Cookfs_FsindexSet - listSize=%" TCL_SIZE_MODIFIER "d",
pathObj->elementCount));
CookfsLog(printf("Cookfs_FsindexSet - listSize=%d", pathObj->elementCount));

if (pathObj->elementCount == 0) {
return NULL;
Expand Down Expand Up @@ -1369,8 +1368,7 @@ static Cookfs_FsindexEntry *CookfsFsindexFind(Cookfs_Fsindex *i, Cookfs_FsindexE
}
}

CookfsLog(printf("CookfsFsindexCreateHashElement - LS=%" TCL_SIZE_MODIFIER
"d", pathObj->elementCount))
CookfsLog2(printf("path elements: %d", pathObj->elementCount));

/* find parent element */
currentNode = CookfsFsindexFindElement(i, pathObj, pathObj->elementCount - 1);
Expand All @@ -1382,18 +1380,18 @@ static Cookfs_FsindexEntry *CookfsFsindexFind(Cookfs_Fsindex *i, Cookfs_FsindexE

/* if parent was not found or is not a directory, return NULL */
if (currentNode == NULL) {
CookfsLog(printf("CookfsFsindexCreateHashElement - node not found"))
CookfsLog2(printf("return NULL (node not found)"));
goto error;
}

if (currentNode->fileBlocks != COOKFS_NUMBLOCKS_DIRECTORY) {
CookfsLog(printf("CookfsFsindexCreateHashElement - not a directory"))
CookfsLog2(printf("return NULL (not a directory)"));
goto error;
}

/* get information about fail of the file name
* and invoke CookfsFsindexFindInDirectory() */
CookfsLog(printf("CookfsFsindexCreateHashElement - Path tail: %s", pathObj->tailName))
CookfsLog2(printf("path tail: %s", pathObj->tailName));

Cookfs_FsindexEntry *rc = CookfsFsindexFindInDirectory(currentNode, pathObj->tailName, command, newFileNode);
if (command != COOKFSFSINDEX_FIND_FIND && rc != NULL) {
Expand Down

0 comments on commit 074d8aa

Please sign in to comment.