Tk Source Code

Ticket Change Details
Login
Overview

Artifact ID: 926e178a1f75a67cc3bc331f5ffec81aa6aedeed
Ticket: d4fb4e80d220e46e588f310291fd7a4205e8cd67
Image photo commands read/write/put do not accept "-" as first letter in file names resp. image data
User & Date: anonymous 2016-12-06 21:35:23
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    If specifying file names starting with "-" (example "-folder.gif") to photo commands read and write gives error:
    unrecognized option "-folder.gif": must be -format, -from, -shrink, or -to
        while executing
    "$img2 read "-folder.gif""
    
    Same problem when having image data for command "put" starting with "-" (i.e. integer 45):
    unrecognized option "--..." must be -format, or -to
        while executing
    "$img2 put [binary format "cu*" $rowList]
    
    Attached is a patch which works for me. It may break existing code, which does not conform to the documentation. Documentation says:
    read fileName options
    while read options filename does work with current implementation.
    Bug seems to be present in 8.5, too.
    
  5. foundin changed to: "8.6.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "b161dbf142556f12a9a6289ffc2a489dd98cabae"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "41. Photo Images"
  15. title changed to:
    Image photo commands read/write/put do not accept "-" as first letter in file names resp. image data
    
  16. type changed to: "Patch"