ZTree.com  | ZEN  | About...  

 Index   Back

[Bug] %4.%5 on a directory is not empty, but '.'   [Zeta]

By: John Gruener     Orlando, Florida  
Date: Nov 17,2019 at 15:34
In Response to: [Bug] %4.%5 on a directory is not empty, but '.' (Ron Metzger)

> > Some of my F9 Menu scripts use "if [%4.%5] == []" to determine if
> > launched from Tree or File window.
> > Could work because when in Tree window, %4 and %5 are both empty.
> > In addition, if you use the term %4.%5, ZTree expanded this to an empty
> > string, i.e. without the user-entered dot in between.
> >
> > Since v2.4.189, ZTree does no more echo a null string, but echoes the
> > user-entered dot:
> > The command 'echo %4.%5'
> > does echo
> > '.'
> >
> > Sincerely, Hartmut

> How about:
> if NOT [%4.%5]==[.] echo %4.%5
>
> Good luck
> Ron Metzger

Ron,

There are certainly workarounds to this, including:
IF [%4] == []
and the ZT Directive:
REM #ZTIfDir

However, some folks may have hundreds of tests like this in their F9 scripts that worked fine prior to v2.4.189.

Also, file names without extensions will now have a dot after their name, which they did not have prior to that version.

So I think this is definitely a bug that should be fixed.

It was most likely introduced as a result of this change:

  • Change- Batch parameters %4 & %5 not set in Directory Mode
    and then fixing a resulting bug in v2.4.188

    - John
  • 56 views      
     

    Messages in this Thread

     
    94,644 Postings in 11,937 Threads, 348 registered users, 13 users online (1 registered, 12 guests)
    Index | Admin contact |   Forum Time: Dec 9, 2019 - 10:54 am EST  |  Hits:29,382,483  (1,318 Today )
    RSS Feed