1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Can't @iniread a section w quotes in the name

Discussion in 'Support' started by noahcoad, Apr 14, 2013.

  1. noahcoad

    Joined:
    Apr 29, 2009
    Messages:
    35
    Likes Received:
    0
    I'm trying to read a git config file which has a section [remote "origin"] w @iniread without success. I may just be doing something wrong.

    [​IMG]

    p.s. attached is the file, I've tried escaping the " a few ways, TCC 15.00.27
     

    Attached Files:

  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    How high is your kludge tolerance?

    Code:
    echo %@winapi[kernel32.dll,GetPrivateProfileStringW,"remote "origin"","url","-N/A-",BUFFER,1024,"%@full[config]"]
    
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    I have no idea why, but TCC is removing **all** quotes!
    Code:
    v:\> type file.cfg
    [nospace]
    me = vince
    [section 1]
    foo = one
    [section "2"]
    bar = two
    
    v:\> echo %@iniread[v:\file.cfg,"s"e"c"t"i"o"n" "1",foo]
    one
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    That, I can understand. But I would expect escaped quotes, or %=Q, to make it through.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    I can't think of a situation in which I'd want to remove all quotation marks from a string. BTW, if you escape them, they're removed and the escape characters remain.
     
  6. noahcoad

    Joined:
    Apr 29, 2009
    Messages:
    35
    Likes Received:
    0
    Thanks for the workaround Charles. It would be nice of course to use the @iniread function, but that unblocks me.
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    Fixed in 15.00.37.
     
    noahcoad likes this.

Share This Page