Tcl Source Code

View Ticket
Login
Ticket UUID: 1043129
Title: file isdirectory (or join ?) bug
Type: Bug Created on: 2004-10-08 15:32:46
Submitter: dem Assigned to: vincentdarley
Subsystem: 37. File System Severity:
Priority: 7 High Last modified: 2004-11-23 22:24:03
Status: Closed Closed by: vincentdarley
Resolution: Fixed Closed on: 2004-11-23 15:24:03
Version: obsolete: 8.5a2
Description:
Hi,

I have a problem with file isdirectory command (Windows
2000 Professionnal,
not tested on other platforms) and I believe this is a
bug :
bug reported with ActiveTcl 8.4.6.1, 8.4.7.0, 8.5.0.0b2
there is no bug with an old 8.3 (I don't know if it's
an ActiveState
package...)

The bug ===>

set p "C:\\toto"
puts [file join $p toto]
puts [file isdirectory $p]
puts [file join $p toto]

==> output :
C:/toto/toto
0
C:\toto/toto

same result if the directory exists except 0 => 1

There aren't any reasons the 2 file join give different
results...

Thanks in advance for explanations and bug fix,

Julien

PS: for the moment in our application I'll make a copy
of the filename
before call file isdirectory... :
file isdirectory $f
'll be changed to
set tmp ""
append tmp "$f"
file isdirectory $tmp
User Comments:
vincentdarley added on 2004-10-18 16:57:49:
Logged In: YES 
user_id=32170

This buglet was introduced by some of the filesystem
optimization. It's relatively harmless, but does need fixing.

vincentdarley added on 2004-11-22 19:53:14:
Logged In: YES 
user_id=32170

Thanks - fixed in cvs head.

hobbs added on 2004-11-23 02:04:23:
Logged In: YES 
user_id=72656

What about 8.4 branch?

vincentdarley added on 2004-11-23 03:08:53:
Logged In: YES 
user_id=32170

Exactly the same patch can be applied around line 4779 of
tclIOUtil.c.  Not sure if it's too late for 8.4.8.

vincentdarley added on 2004-11-23 03:08:59:
Logged In: YES 
user_id=32170

Exactly the same patch can be applied around line 4779 of
tclIOUtil.c.  Not sure if it's too late for 8.4.8.

hobbs added on 2004-11-23 03:11:16:
Logged In: YES 
user_id=72656

Too late for 8.4.8, but go ahead and apply anyway.  Thanks.

vincentdarley added on 2004-11-23 22:24:03:
Logged In: YES 
user_id=32170

Fixed in 8-4 branch.