diff options
| author | dgp <dgp@users.sourceforge.net> | 2019-03-07 20:05:01 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2019-03-07 20:05:01 (GMT) |
| commit | 68061dfef2a2d216cd2e4c7bbe169e6f05fece70 (patch) | |
| tree | 2f976786160da875c31a5ac86e6a9ec25139652c /unix/tclUnixFCmd.c | |
| parent | 781c32ac29d9ab9c771d3dee2ed305450e9d8378 (diff) | |
| parent | 0801e742abbbe74e43b87b0ea139e700c7094627 (diff) | |
| download | tcl-68061dfef2a2d216cd2e4c7bbe169e6f05fece70.zip tcl-68061dfef2a2d216cd2e4c7bbe169e6f05fece70.tar.gz tcl-68061dfef2a2d216cd2e4c7bbe169e6f05fece70.tar.bz2 | |
Merge forward to demonstrate the test fails after the bug arrived.
Diffstat (limited to 'unix/tclUnixFCmd.c')
| -rw-r--r-- | unix/tclUnixFCmd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index a1a409e..ae20ee0 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -369,13 +369,13 @@ DoRenameFile( if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; - DIR *dirPtr; + TclDIR *dirPtr; Tcl_DirEntry *dirEntPtr; if ((Realpath((char *) src, srcPath) != NULL) /* INTL: Native. */ && (Realpath((char *) dst, dstPath) != NULL) /* INTL: Native */ && (strncmp(srcPath, dstPath, strlen(srcPath)) != 0)) { - dirPtr = opendir(dst); /* INTL: Native. */ + dirPtr = TclOSopendir(dst); /* INTL: Native. */ if (dirPtr != NULL) { while (1) { dirEntPtr = TclOSreaddir(dirPtr); /* INTL: Native. */ @@ -385,11 +385,11 @@ DoRenameFile( if ((strcmp(dirEntPtr->d_name, ".") != 0) && (strcmp(dirEntPtr->d_name, "..") != 0)) { errno = EEXIST; - closedir(dirPtr); + TclOSclosedir(dirPtr); return TCL_ERROR; } } - closedir(dirPtr); + TclOSclosedir(dirPtr); } } errno = EINVAL; @@ -965,7 +965,7 @@ TraverseUnixTree( #ifndef HAVE_FTS int numProcessed = 0; Tcl_DirEntry *dirEntPtr; - DIR *dirPtr; + TclDIR *dirPtr; #else const char *paths[2] = {NULL, NULL}; FTS *fts = NULL; @@ -990,7 +990,7 @@ TraverseUnixTree( errorPtr); } #ifndef HAVE_FTS - dirPtr = opendir(source); /* INTL: Native. */ + dirPtr = TclOSopendir(source); /* INTL: Native. */ if (dirPtr == NULL) { /* * Can't read directory @@ -1002,7 +1002,7 @@ TraverseUnixTree( result = traverseProc(sourcePtr, targetPtr, &statBuf, DOTREE_PRED, errorPtr); if (result != TCL_OK) { - closedir(dirPtr); + TclOSclosedir(dirPtr); return result; } @@ -1052,11 +1052,11 @@ TraverseUnixTree( * NULL-return that may a symptom of a buggy readdir. */ - rewinddir(dirPtr); + TclOSrewinddir(dirPtr); numProcessed = 0; } } - closedir(dirPtr); + TclOSclosedir(dirPtr); /* * Strip off the trailing slash we added |
