#1203 ooRexx 4.1.3 64-bit on Windows 7 Home Premium SysFileTree attribute handling errors.

v4.2.0
closed
Mark Miesfeld
rexxutil (2)
complete
9
2014-05-12
2013-10-25
Bob Coleman
No

I use

call SysFileTree 'x:\',files,'s','+****','-****'

to clear the archive attribute of all files on a disk (partition). I've recently discovered a few anomalies with this.

Sometimes, the archive attributes get cleared except on the last file returned on which the archive attribute stays.

I've seen cases where, probably on a single file on the partition, archive gets cleared, but hidden and system get set. However, I can't reproduce that fight now.

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2013-10-26

    • labels: --> rexxutil
    • status: open --> pending
    • assigned_to: Mark Miesfeld
    • Pending work items: none --> complete
    • Group: None --> 4.1.4
     
  • Bob Coleman
    Bob Coleman
    2013-10-28

    I'm not sure which part you were able to reproduce. I'm now seeing the behavior of clearing archive, but setting hidden and system again.

     
  • Mark Miesfeld
    Mark Miesfeld
    2013-10-29

    Bob, you do realize that you won't see the fix until the next bug release.

    I was able to reproduce the archive bit of the last file not being cleared.

    If you can create a test case for the behavior of clearing the archive bit, but setting the hidden and system bits, then I'll test it to see if it is fixed. If it isn't, I'll fix it. It should be sufficient to supply a list of the directory tree structure and files, and the exact command you ran.

     
  • Bob Coleman
    Bob Coleman
    2013-10-29

    Unfortunately, I doubt I can produce a test case. Even when I try to cause the behavior, I've been successful in doing so on only one partition. Below is a trace of creating the described behavior. New Text Document.txt had archive set before running temp.rex. Immediately following the call to SysFileTree before any further trace output, New Text Document.txt had hidden and system set and archive cleared. Note that two files were returned: New Text Document.txt and desktop.ini in the recycle bin which has hidden and system set.

    I ran temp.rex several more times. The desktop.ini file (only) was returned each time, but with archive, hidden and system set!

    I suspect that the setting of hidden and system on New Text Document.txt might be somehow related to the supposed presence of the desktop.ini file. I suspect this only because on another partition no desktop.ini file is returned and no hidden and system attributes are set.

    On the j: partition, I can't find or affect the desktop.ini file by any other method that I know about. Both dir and del say it's not found. Chkdsk j: reports no problems found.

    At this point, I realize this is probably not something that can be reproduced or fixed.

    2013-10-28 20:44:08.55 D:>rexx temp
    +++ "WindowsNT COMMAND D:\Bat\temp.rex"
    3 - call SysFileTree 'j:\',files,'s','+*','-*'
    >>> "0"
    +++ Interactive trace. "Trace Off" to end debug, ENTER to Continue. +++

     4 *-* say  files.0
       >>>   "2"
    

    2

     5 *-* do i = 1 to files.0
       >>>     "1"
    
     7 *-*   parse var files.i date time size attributes spec
       >>>     "10/28/13   8:42p           3  A----  j:\New Text Document.txt"
       >>>     "10/28/13"
       >>>     "8:42p"
       >>>     "3"
       >>>     "A----"
       >>>     " j:\New Text Document.txt"
    
    12 *-* end
     5 *-* do i = 1 to files.0
       >>>     "1"
       >>>     "2"
     7 *-*   parse var files.i date time size attributes spec
       >>>     "10/25/13   3:00p         129  --H-S  j:\$RECYCLE.BIN\S-1-5-21-31
    

    0924171-53042146-3799878018-1001\desktop.ini"
    >>> "10/25/13"
    >>> "3:00p"
    >>> "129"
    >>> "--H-S"
    >>> " j:\$RECYCLE.BIN\S-1-5-21-310924171-53042146-3799878018-1001\des
    ktop.ini"

    12 *-* end
     5 *-* do i = 1 to files.0
       >>>     "2"
       >>>     "3"
    

    2013-10-28 20:44:36.21 D:>

     
  • Mark Miesfeld
    Mark Miesfeld
    2013-10-29

    Bob, I had believed that the hidden system thing was fixed. But, I wasn't sure.

    After reading your last description I was able to set up a test case that shows it is fixed.

    Start with a j: drive and show the attributes:

    J:>attrib
    A J:\desktop.ini
    A SH J:\qtest.rex

    Run SysFileTree using ooRexx 4.1.3:

    C:\work.ooRexx\wc\static.docs>qtest.rex
    C:\work.ooRexx\wc\static.docs
    ret: 0 count: 2
    9/23/11 8:49p 129 A---- J:\desktop.ini
    6/13/13 6:49a 122 --H-S J:\qtest.rex

    C:\work.ooRexx\wc\static.docs>j:

    J:>attrib
    SH J:\desktop.ini
    A SH J:\qtest.rex

    So, desktop.ini started with the archive only bit set, and ended with the archive bit cleared and the system and hidden bits set. Exactly as your New Text Document.txt

    Reset the attributes:

    J:>attrib
    A J:\desktop.ini
    A SH J:\qtest.rex

    Run the SysFileTree test under ooRexx 4.1.4:

    C:\work.ooRexx\wc\static.docs>j:

    J:>attrib
    J:\desktop.ini
    SH J:\qtest.rex

    J:>

    Both files have the archive bit cleared and desktop.ini does not get its system and hidden bits set.

    So your bug is fixed.

    The fix will be in the next official release of ooRexx.

     

  • Anonymous
    2014-05-12

    Since I installed 4.2.0 Resetting S and H flags fails. It doesn't do anything.
    1222 - parse arg 41 PrvFile '' imgY size
    >>> "2014-05-12 06:27:14 318197 A-H-S D:\TBBXVM\1041598748.jexe"
    >L> "41"
    >>> "41"
    >L> ""
    >>> ""
    >=> PRVFILE <= "D:\TBBXVM\1041598748.jexe"
    >=> IMGY <= ""
    >=> SIZE <= ""

    1223 - call SysFileTree PrvFile,'t.','FO',,'---'
    >V> PRVFILE => "D:\TBBXVM\1041598748.jexe"
    >A> "D:\TBBXVM\1041598748.jexe"
    >L> "t."
    >A> "t."
    >L> "FO"
    >A> "FO"
    >A> ""
    >L> "
    ---"
    >A> "**---"
    >>> "0"
    "Attrib" prvFile
    A SH D:\TBBXVM\1041598748.jexe

    So I did it manually during the interactive trace:
    "Attrib -H -S" prvFile
    "Attrib" prvFile
    A D:\TBBXVM\1041598748.jexe

    My REXX script is supposed to set S and H again, and that fails too:
    To confirm the settings before calling SysFileTree:
    "Attrib" prvFile
    A D:\TBBXVM\1041598748.jexe

    1229 - call SysFileTree PrvFile,'t.','FO',,'+-+'
    >V> PRVFILE => "D:\TBBXVM\1041598748.jexe"
    >A> "D:\TBBXVM\1041598748.jexe"
    >L> "t."
    >A> "t."
    >L> "FO"
    >A> "FO"
    >A> ""
    >L> "
    +-+"
    >A> "**+-+"
    >>> "0"
    "Attrib" prvFile
    A D:\TBBXVM\1041598748.jexe

    S and H Attributes were no set....

    parse source a;say a
    WindowsNT COMMAND D:\PMVHWEG.CMD
    parse version a;say a
    REXX-ooRexx_4.2.0(MT)_32-bit 6.04 22 Feb 2014

    And, I do run in a CMD session with opened with "run as Administrator"

    Kris Buelens

     

  • Anonymous
    2014-05-12

    I just did some more tests. When I change the flags from FO to FL, the attributes are (re)set as requested. Here the interactive trace:
    "Attrib" prvFile
    A D:\TBBXVM\tanl1932621997.jexe

    1229 - call SysFileTree PrvFile,'t.','FO',,'+-+'
    >V> PRVFILE => "D:\TBBXVM\tanl1932621997.jexe"
    >A> "D:\TBBXVM\tanl1932621997.jexe"
    >L> "t."
    >A> "t."
    >L> "FO"
    >A> "FO"
    >A> ""
    >L> "
    +-+"
    >A> "+-+"
    >>> "0"
    "Attrib" prvFile
    A D:\TBBXVM\tanl1932621997.jexe
    call SysFileTree PrvFile,'t.','FL',,'
    +-+'
    "Attrib" prvFile
    A SH D:\TBBXVM\tanl1932621997.jexe
    exit

    P.S. I didn't say I run on Windows 7
    Kris Buelens

     


Anonymous


Cancel   Add attachments