Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

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

Apr
35
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.

2013-04-14_0022.png


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

Attachments

  • config.zip
    355 bytes · Views: 293
How high is your kludge tolerance?

Code:
echo %@winapi[kernel32.dll,GetPrivateProfileStringW,"remote "origin"","url","-N/A-",BUFFER,1024,"%@full[config]"]
 
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
 
That, I can understand. But I would expect escaped quotes, or %=Q, to make it through.
 
That, I can understand. But I would expect escaped quotes, or %=Q, to make it through.
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.
 
Thanks for the workaround Charles. It would be nice of course to use the @iniread function, but that unblocks me.
 

Similar threads

Back
Top