String::Quote is actually an awful name:

String::Quote("Martin's File; rm -rf /")  -> "Martin'\\''s File; rm -rf /"

To be of any use, you must wrap its result with single quotes.

On Mon, Oct 10, 2011 at 10:54:08AM -0000, [email protected] wrote:
> Author: jsuchome
> Date: Mon Oct 10 12:54:07 2011
> New Revision: 66356
> 
> URL: http://svn.opensuse.org/viewcvs/yast?rev=66356&view=rev
> Log:
> - agent: pass map refereces as arguments
> - quote strings passed to bash commands
> - fixed testsuite
> - 2.21.13
> @@ -636,7 +637,7 @@
>           files = filter (string file, files, {
>               if (haskey (files_index, file))
>               {
> -                 to_restore  = add (to_restore, Snapper::GetFileFullPath 
> (file));
> +                 to_restore  = add (to_restore, String::Quote 
> (Snapper::GetFileFullPath (file)));
>                   return true;
>               }
>               else
> 

This is suspicious. And indeed, to_restore is not passed to
.target.bash later. In this case it is only displayed to the user.

.target.bash sucks.
-- 
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu

Attachment: pgpoK7MpTWYnl.pgp
Description: PGP signature

Reply via email to