Skip to content

Commit d14dc04

Browse files
committed
Bug fix: sort order
1 parent 3cda795 commit d14dc04

File tree

8 files changed

+41
-32
lines changed

8 files changed

+41
-32
lines changed

APLSource/Latest/History.aplf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
History
2+
⍝ * 3.0.2 from 2019-01-19
3+
⍝ * Default sequence was buggy.
24
⍝ * 3.0.1 from 2019-01-07
3-
⍝ * Bug fix: result was not ordered correctly under certain circumstances.
5+
⍝ * Bug fixes:
6+
⍝ * Result was not ordered correctly under certain circumstances.
7+
⍝ * If no acre project was open and the current directory did not have a sub-folder
8+
⍝ `APLSource` an error was signalled. Should return an empty result instead.
49
⍝ * 3.0.0 from 2019-01-06
510
⍝ * Can now handle accre projects as well as ordinary namespaces and
611
⍝ even whole workspaces.

APLSource/Latest/Run.aplf

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,47 @@
2525
path←'expand'F.NormalizePath path
2626
:EndIf
2727
:If acreFlag
28-
r←⍉⊃('recursive' 1)('type'(0 1 3))F.Dir path
29-
r←(r[;1]=2)⌿r ⍝ Only regular files
30-
r[;2]←↓A.FormatDateTime⊃r[;2]
31-
r←r[⍋⊃r[;2];0 2]
32-
:If stats
33-
buff←10↑¨r[;1]
34-
r←⊖(∪buff),[0.5]buff{+/⍵}⌸(≢r)⍴1
35-
r←r[⍋r[;0];]
36-
:Else
28+
:If F.IsDir path
29+
r←⍉⊃('recursive' 1)('type'(0 1 3))F.Dir path
30+
r←(r[;1]=2)⌿r ⍝ Only regular files
31+
r[;2]←↓A.FormatDateTime⊃r[;2]
32+
r←r[⍋⊃r[;2];0 2]
33+
:If stats
34+
buff←10↑¨r[;1]
35+
r←⊖(∪buff),[0.5]buff{+/⍵}⌸(≢r)⍴1
36+
r←r[⍋r[;0];]
37+
:Else
3738
⍝ `noOf` is ...
3839
⍝ ⍬ in case no argument was provided
3940
⍝ 0 in case text was provided as argument
4041
⍝ An integer otherwise.
41-
:If ⍬≡noOf
42-
r←((10↑¨r[;1])≡¨⊂10↑1⊃r[0;])⌿r
43-
:ElseIf 0≢noOf
44-
:If ¯1=×noOf
45-
buff←10↑¨r[;1] ⍝ YYYY-MM-DD
46-
r←(buff∊noOf{(⍺⌊≢⍵)↑⍵}∪⌽buff)⌿r
47-
:Else
48-
r←(noOf⌊≢r)↑r
42+
:If ⍬≡noOf
43+
r←((10↑¨r[;1])≡¨⊂10↑1⊃r[¯1+≢r;])⌿r
44+
:ElseIf 0≢noOf
45+
:If ¯1=×noOf
46+
buff←10↑¨r[;1] ⍝ YYYY-MM-DD
47+
r←(buff∊noOf{(⍺⌊≢⍵)↑⍵}∪⌽buff)⌿r
48+
:Else
49+
r←(noOf⌊≢r)↑r
50+
:EndIf
4951
:EndIf
50-
:EndIf
51-
:If 0=+/≢¨r[;0]
52-
r←0 2⍴''
53-
:EndIf
54-
:If 0<≢r
55-
:If pathFlag
56-
:AndIf ~(⊂path)∊(F.NormalizePath{⍵[;1],¨⊂'APLSource\'}⎕SE.acre.Projects'')
57-
r[;0]←(≢path)↓¨r[;0]
58-
:Else
59-
r[;0]←⎕SE.acre.Itemname r[;0]
52+
:If 0=+/≢¨r[;0]
53+
r←0 2⍴''
6054
:EndIf
61-
:If 0<≢match
62-
r←(match{⍺∘≡¨(≢⍺)↑¨⍵}r[;0])⌿r
55+
:If 0<≢r
56+
:If pathFlag
57+
:AndIf ~(⊂path)∊(F.NormalizePath{⍵[;1],¨⊂'APLSource\'}⎕SE.acre.Projects'')
58+
r[;0]←(≢path)↓¨r[;0]
59+
:Else
60+
r[;0]←⎕SE.acre.Itemname r[;0]
61+
:EndIf
62+
:If 0<≢match
63+
r←(match{⍺∘≡¨(≢⍺)↑¨⍵}r[;0])⌿r
64+
:EndIf
6365
:EndIf
6466
:EndIf
67+
:Else
68+
r←0 0⍴''
6569
:EndIf
6670
:ElseIf ((,'#')≡,path)∨9=⎕NC path
6771
:If 0=≢noOf

APLSource/Latest/Version.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
r←Version
22
⍝ See also `History`
3-
r←'Latest' '3.0.1.22' '2020-01-07'
3+
r←'Latest' '3.0.2.25' '2020-01-19'

Dist/Latest-3.0.1.22.zip

-85.9 KB
Binary file not shown.

Dist/Latest-3.0.2.25.zip

86.1 KB
Binary file not shown.

Dist/Latest.dws

496 Bytes
Binary file not shown.

project.dws

1.44 KB
Binary file not shown.

publish.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<tool name="Latest"> <version>3.0.1</version> <date>2020-01-07</date> <container>#.Latest</container> <needs> <script>APLTreeUtils</script> <script>FilesAndDirs</script> <script development="true">Tester2</script> </needs> <admin>0</admin> <autoload>1</autoload> <buildid>22</buildid></tool>
1+
<tool name="Latest"> <version>3.0.2</version> <date>2020-01-19</date> <container>#.Latest</container> <needs> <script>APLTreeUtils</script> <script>FilesAndDirs</script> <script development="true">Tester2</script> </needs> <admin>0</admin> <autoload>1</autoload> <buildid>25</buildid></tool>

0 commit comments

Comments
 (0)