Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0cd4bc9531c47940274b3395bdb53db3b49688d2babcf7ec930702d3dc49f50c
Ticket: efd15d181ae9be3b538eb23534d37d8f1d96cd57
problem with % in [exec] on windows
User & Date: sebres on 2020-08-04 16:09:02
Changes

  1. closedate changed to: "2459066.17294007"
  2. closer changed to: "sebres"
  3. icomment:
    The main reason for the fix is described in [21b0629c81] (as well as self-descriptive in test cases). Shortly it is a certain insanity by the argument parsing in MS - in opposite to *nux the arguments are parsed by program so differently if called a program processor (comspec) and other executable.
    The current handling of %-char is not optimal (see further ticket [344b1a0c0f]) and I'll try to fix that, but this ticket is rather a duplicate, so I'll close it here.
    
    As for the fix, the main issue is that [https://github.com/sebres/PoC/issues/1|parameter substitution in comspec is ambiguous], so proper quoting/escape is hardly possible and [https://github.com/microsoft/terminal/issues/250|MS refuses to fix it due to compat reasons]
    
    Thus at the moment the fix may look like:
    <ul>
        <li>try to "escape" as safe as possible</li>
        <li>raise exception "Unpaired quote found" ...</li>
    </ul>
    Whereas it must additionally distinguish between execution of comspec (shell), a batch-script and other executable. Let alone the escape using <code>^</code> char together with double/triple quotation (or using <code>\"</code>) is impossible, the %-char is allowed as part of file name.
    
    
    Closed as dup of [344b1a0c0f].
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Duplicate"
  7. status changed to: "Closed"