[Tilesathome] Possible inconsistency in handling of double quotes in tilesAtHome.conf on windows.

Dirk-Lüder Kreie osm-list at deelkar.net
Fri Nov 30 16:08:30 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Reid schrieb:
> Bjornman wrote the following on 29/11/2007 20:04:
>> The problem is that the path is quoted in one place (in tilesgen.pl) 
>> but not in another (tahconfig.pm <http://tahconfig.pm>).  To use it 
>> with spaces, the code needs to be fixed in one of those places.
>>
>> If you specify it in tilesathome.conf without quotes as
>> Inkscape=c:\Program Files\inkscape\inkscape
>> you'll need to change one line in tahconfig.pm <http://tahconfig.pm> 
>> from:
>> tahconfig.pm(line157): my $InkscapeV = `$Config->{Inkscape} --version`;
>> to
>> tahconfig.pm(line157): my $InkscapeV = `"$Config->{Inkscape}" --version`;
>>
> I see this change was made in r5813 which has fixed things for Inkscape, 
> thanks.
> I can see also that the other config paths were also changed to be 
> quoted in tahconfig.pm. This unfortunately means we now have the reverse 
> situation with the Zip config path that it is quoted in tahconfig.pm but 
> not in compress.pl and with the Pngcrush config path which is quoted in 
> tahconfig.pm but not in tilesGen.pl
> 
> I think what needs to be done is change the 2 sprintfs in compress.pl from :
> 
>     if ($Config{"7zipWin"})
>     {
>         $Command1 = sprintf("%s %s %s %s",
>           $Config{"Zip"},
>           "a -tzip",
>           $Filename,
>           "$Dir/*.png");
>     }
>     else
>     {
>         $Command1 = sprintf("%s -r -j %s %s > %s",
>           $Config{"Zip"},
>           $Filename,
>           "$Dir",
>           $stdOut);
> 
> to :
>     if ($Config{"7zipWin"})
>     {
>         $Command1 = sprintf("\"%s\" %s %s %s",
>           $Config{"Zip"},
>           "a -tzip",
>           $Filename,
>           "$Dir/*.png");
>     }
>     else
>     {
>         $Command1 = sprintf("\"%s\" -r -j %s %s > %s",
>           $Config{"Zip"},
>           $Filename,
>           "$Dir",
>           $stdOut);
> 
> And change the sprintf in tilesGen.pl from  :
>                 my $Cmd = sprintf("%s %s -q %s %s %s",
>                   $Config{Niceness},
>                   $Config{Pngcrush},
>                   $Filename2,
>                   $Filename,
>                   $Redirect);
> to:
>                 my $Cmd = sprintf("%s \"%s\" -q %s %s %s",
>                   $Config{Niceness},
>                   $Config{Pngcrush},
>                   $Filename2,
>                   $Filename,
>                   $Redirect);
> 
> I've tested that here and it seems to work but since i'm new to perl and 
> SVN  can someone check my suggested change and implement?
> 
> This change will mean any windows clients who were using double quotes 
> in their conf will need to remove them although they may already be 
> broken after r5813. Are there many of us?

I'll fix this immediately.
Next time, attach output from svn diff for even speedier handling ;)

- --

Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0952°N 8.8652°E

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHUDV9FUbODdpRVDwRAvPIAJ9wYFu8CS2Fn4UPgOFhLocZ8fkJWwCaA0LB
11JVhONTCjJxY6TkgFLUjVo=
=xQme
-----END PGP SIGNATURE-----




More information about the Tilesathome mailing list