diff options
author | sebres <sebres@users.sourceforge.net> | 2024-09-17 14:13:14 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-09-17 14:13:14 (GMT) |
commit | 18ed5377e67970c87daf0c2d6f0fee40e4744582 (patch) | |
tree | bbdc161b100a086dd602eaf2b6b08bfe48a3e2ca /unix/tclUnixFile.c | |
parent | e5dcd8f739b96df18f98713d33b39c963c435bbd (diff) | |
parent | f2b14cb7f00034cf7c9ee3e5681e4c912ca7ff9c (diff) | |
download | tcl-18ed5377e67970c87daf0c2d6f0fee40e4744582.zip tcl-18ed5377e67970c87daf0c2d6f0fee40e4744582.tar.gz tcl-18ed5377e67970c87daf0c2d6f0fee40e4744582.tar.bz2 |
merge bug-02d5d65d70adab97: avoid unneeded (but expensive) path normalization for several file subsystem commands and operations;
closes [02d5d65d70adab97]
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 c39e7b6..9769b13 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1076,9 +1076,9 @@ TclNativeCreateNativeRep( Tcl_Obj *validPathPtr; int 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). */ |