Hello,

I'm trying to use foreach statement to go over list of directories and check if they are exists during the preBuildctionList. My code is very simple a shown below. But I found that the first showInfo in my code cuts the string if it is long then 82 characters. In the output below you can see that the last two directories are cut and it means that the variable of the foreach holds wrong directory name.

Code

<foreach variables="dir" values="dir1 dir2 directory1 directory2">
    <actionList>
        <showInfo text="${tdir}/${dir}"/>
        <showInfo>
            <text>${tdir}/${dir}</text>
            <ruleList>
                <fileTest path="${tdir}/{$dir}" condition="is_directory"/>
                <fileTest path="${tdir}/{$dir}" condition="exists"/>
            </ruleList>
        </showInfo>
    </actionList>
</foreach>

output

Info:  
/users/ronenal/bitrock/t/2014/Paradigm-2014-Applications-Linux/Applications/dir1 
Press [Enter] to continue :     
Info:  
/users/ronenal/bitrock/t/2014/Paradigm-2014-Applications-Linux/Applications/dir2 
Press [Enter] to continue : 
Info:  
/users/ronenal/bitrock/t/2014/Paradigm-2014-Applications-Linux/Applications/direc 
tory1
Press [Enter] to continue :
Info:  
/users/ronenal/bitrock/t/2014/Paradigm-2014-Applications-Linux/Applications/direc 
tory2
Press [Enter] to continue :

Is there anyway to make it the variable to be set to the entire path?

Thanks, Ronen

asked 08 Aug '13, 10:52

Ronen's gravatar image

Ronen
16565656
accept rate: 0%


Hi Ronen,

The variable is set properly. What you are seeing in the screen is that the installer is wrapping the strings printed (you can see the string continues in the next line).

link

answered 08 Aug '13, 11:02

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×8

Asked: 08 Aug '13, 10:52

Seen: 1,026 times

Last updated: 08 Aug '13, 11:02