Overview
| Artifact ID: | fb630ab2a622038121d8ad69ed684d32c5db787e |
|---|---|
| Ticket: | 1951574fffffffffffffffffffffffffffffffff
problem with "file executable" on windows, tcl 8.5.2 |
| User & Date: | ralfixx on 2008-04-25 21:45:24 |
Changes
- icomment:
Logged In: YES user_id=377375 Originator: YES [ferrieux] > ... on Windows, where the extension .EXE .BAT (or > whatever in PATHEXT) is, to my knowledge, the only criterion used by > the OS itself to decide whether it should execute it or not. Am I > right to believe this, in which case the thing to do would be to add > an extension check in [file executable], or is there really an > OS-enforced executable flag in some flavours of Windows, in which > case the OS/Samba route is worth pursuing ? This .exe/.bat check is already performed by the function, right before the code section which performs the ACL check: if (mode & X_OK) { if (!(attr & FILE_ATTRIBUTE_DIRECTORY) && !NativeIsExec(nativePath)) { /* * It's not a directory and doesn't have the correct extension. * Therefore it can't be executable */ Tcl_SetErrno(EACCES); return -1; } } This check (namely NativeIsExec()) succeeds for the file in question. But then, the extended check is performed which fails for the networked file. I wonder whether this extended check is only relevant for non-plain-files (directories?) since there I see: % file executable l:/ralf/si++aegis/si++.4.0.C443/bin/winnt/ 1 % file executable l:/ralf/si++aegis/si++.4.0.C443/bin/winnt/gen.exe 0 R' - login: "ralfixx"
- mimetype: "text/plain"
- username: "ralfixx"