diff --git a/StartupSession/Link/Create.aplf b/StartupSession/Link/Create.aplf index 85163ed8..b071871d 100644 --- a/StartupSession/Link/Create.aplf +++ b/StartupSession/Link/Create.aplf @@ -57,21 +57,24 @@ NOHOLD: emptydir←1 ⋄ isfile←0 :EndIf - fulltarget←dir + fulltarget←0 U.NormFile dir hasns←(|nc)∊singlenc :If isfile∨hasns :If isfile←nc∊singlenc ⍝ Scripted thing dir←¯1↓⊃⎕NPARTS fulltarget ⍝ Directory is one up emptyns←1 - :ElseIf ~opts.(preloaded∨flatten) - :If ~emptyns←0∊⍴U.ListNames nsref←⍎ns ⍝ some APL names defined - :AndIf ~emptydir ⍝ some dir/files defined - :AndIf (⊂opts.source)∊'auto' 'dir' ⍝ will not erase dir - ⍝ link issue #160: allow some APL names to be tied to source files when source is dir - typically happens when starting dyalog with load=boot.aplf - won't work with arrays - emptyns←emptyns U.EmptyNamespace nsref dir + :Else + emptyns←0∊⍴U.ListNames nsref←⍎ns + :If~opts.(preloaded∨flatten) + :If ~emptyns ⍝ some APL names defined + :AndIf ~emptydir ⍝ some dir/files defined + :AndIf (⊂opts.source)∊'auto' 'dir' ⍝ will not erase dir + emptyns←emptyns U.EmptyNamespace nsref dir + :EndIf :EndIf :EndIf - :Else ⋄ emptyns←1 + :Else + emptyns←1 :EndIf :If opts.singlefile←isfile