Bug in "the folders"?

Tariel Gogoberidze tariel at mac.com
Fri Mar 23 19:31:10 EDT 2007


On Mar 23, 2007, at 7:41 AM, Sivakatirswami wrote:

> ... snip..

> The following "old" directory walker I have use for "decades" from Ken 
> Ray.
> Suddenly it is skipping any folders that start with a space.


>
> on directoryWalk gMainFolder
>
>    set the itemDel to "/"
>    set the directory to gMainFolder
>    put the files into  tFiles
>   put the files into temp
>
> put fld "ID"  into tID
> set the itemdel to "_"
> repeat for each line x in temp
>    if item 1 of x = tID then put x & cr after tHits
> end repeat
>
>    sort temp
>    repeat for each line x in temp
>      if x is not empty then
>        put gMainFolder & "/" & x & cr after gHierList
>      end if
>    end repeat


>    put the folders into tDirList # any folder that begin with space 
> are not returned here.


Interesting, because even if it would return folder with leading space 
here it would be deleted after next two lines.


>    sort tDirList
>    delete line 1 of tDirList

delete line 1 of tDirList is here to delete ".." but if there is a 
folder with leading space it sorts before the ".." and gets deleted.

So, may be you should try to toggle above two lines?

best regards
Tariel




More information about the use-livecode mailing list