diff options
| author | sebres <sebres@users.sourceforge.net> | 2024-09-17 15:35:29 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2024-09-17 15:35:29 (GMT) |
| commit | 5f45cd9b777956bc9e8c879676d3f728db948756 (patch) | |
| tree | 3add7505c1de8a74e3f344aaafbe20ec1b7b5018 /unix/tclUnixFile.c | |
| parent | 36f92e4f3a7b7c2145d7423d944b9a5d79c4d74a (diff) | |
| parent | 617e81d982e512223c456a95df28eab0141a4f21 (diff) | |
| download | tcl-5f45cd9b777956bc9e8c879676d3f728db948756.zip tcl-5f45cd9b777956bc9e8c879676d3f728db948756.tar.gz tcl-5f45cd9b777956bc9e8c879676d3f728db948756.tar.bz2 | |
merge 8.7: avoid unneeded (but expensive) path normalization for several file subsystem commands and operations;
closes [02d5d65d70adab97] and probably [411f52ed87e313dd49e2]
Diffstat (limited to 'unix/tclUnixFile.c')
| -rw-r--r-- | unix/tclUnixFile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index e91ed41..2b0b5b0 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1119,9 +1119,9 @@ TclNativeCreateNativeRep( Tcl_Obj *validPathPtr; Tcl_Size len; - if (TclFSCwdIsNative()) { + if (TclFSCwdIsNative() || Tcl_FSGetPathType(pathPtr) == TCL_PATH_ABSOLUTE) { /* - * The cwd is native, which means we can use the translated path + * The cwd is native (or path is absolute), use the translated path * without worrying about normalization (this will also usually be * shorter so the utf-to-external conversion will be somewhat faster). */ |
