• Robert Sprowson's avatar
    Create intermediates for a (non leaf) new directory · 469d30f3
    Robert Sprowson authored
    The Ursula Filer enhancements (see 1309,211/FS section 4.4) aimed to replace the former 'New directory' writeable with a Save As style draggable box, based on the 'Copy as' one. However, its implementation was asymmetrical.
    Consider what 'Copy as' does:
    * When the dir icon is dragged the leaf is used as the target regardless of what else was typed in the text box
      eg. "foo.bar.baz" when dragged will created "baz" only
    * When text is typed in the box and OK (or enter) pressed
      * If the text is a leaf (no dots) it is prefixed with the containing dir then passed to *COPY
      * Otherwise passed direct to *COPY which will recursively create the steps
        eg. select "baz", type "foo.bar", result is contents of "baz" now copied to "foo.bar.baz" in the CSD - which may not be the containing dir
    Whereas 'New directory' did:
    * When the dir icon is dragged the leaf is used as the target regardless of what else was typed in the text box
    * When text is typed in the box and OK (or enter) pressed
      * If the text is a leaf (no dots) it is prefixed with the containing dir then passed to *CDIR
      * Otherwise passed direct to *CDIR which will error "Not found" since the intermediates are missing
    
    Update the Filer to spot the last case and create the intermediates, before presenting the final path to *CDIR as before.
    
    Clicks.s: For each path element create the directory, then call *CDIR for the final level.
    DecodeMenu.s: Delete dead code.
    PathMunge.s: Correct comment (r1 is preserved).
    
    Version 2.44. Tagged as 'Filer-2_44'
    469d30f3
DecodeMenu 37.7 KB