Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-09-24
22:05 • Closed ticket [2974459fff]: file readable reports Windows off-line files as unre... artifact: bd9d68bb2c user: dkf
2012-02-03
00:41 • Pending ticket [2974459fff]. artifact: 59b889a2cc user: dgp
2012-01-14
01:26 • Ticket [2974459fff]: 4 changes artifact: 23e98b3a92 user: dgp
2010-03-22
20:26 • Ticket [2974459fff]: 4 changes artifact: 9e6d71797b user: dkf
20:25 • Ticket [2974459fff]: 2 changes artifact: 695b350653 user: dkf
10:14 • New ticket [2974459fff]. artifact: 91aae32680 user: mikehedge

file readable reports Windows off-line files as unreadable

Closed / Fixed2974459fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 13 years ago
Descriptionplain2010-03-22 10:14:55
The file readable command correctly reports files on Windows (XP Professional 2002/SP2) mapped drives as readable when reading is possible:

% file exists r:\mydirectory\test.txt
1
% file readable r:\mydirectory\test.txt
1
% set chid [open r:\mydirectory\test.txt]
filef0ca80
% set contents [read $chid]
record 1 of 2 of test file test.txt
record 2 of 2 of test file test.txt
% close $chid


However, if the file is now made off-line, effectively making a local copy, and the connection to the mapped drive removed, the (local) file still exists and is readable but file readable reports it is not (0):

% file exists r:\mydirectory\test.txt
1
% file readable r:\mydirectory\test.txt
0<-- incorrect response
% set chid [open r:\mydirectory\test.txt]
fileefd600
% set contents [read $chid]
record 1 of 2 of test file test.txt
record 2 of 2 of test file test.txt
% close $chid
dkf Ticket [2974459fff]: 2 changes [History diff]2010-03-22 20:25:56
dkfplain2010-03-22 20:26:25
(issue is in/below Tcl_FSAccess)
dgpplain2012-01-14 01:26:39
The branch 'fix-win-native-access' includes a patch that
may fix the bug reported here.

  http://core.tcl.tk/tcl/info/0aabf0529e

I'm not equipped to test the effectiveness of the
patch, or whether it introduces any new test
failures or other problems.  I'd be grateful if folks
who can and who are intersted in this bug and related
bugs could do so, and report back whether the patch
is suitable for merging into the release branches.
dgpplain2012-02-03 00:41:17
Patch from fix-win-native-access branch
committed for 8.4.20, 8.5.12, and 8.6b3.

Continued testing strongly encouraged.

In particular, the #define UNICODE variant
of the trunk is likely to have some lingering
problems.
dkf Closed ticket [2974459fff]. [History diff]2013-09-24 22:05:05
Log in (anonymous is fine) to add a comment.