• Feature Request: file relative

    From Jim Lewis@21:1/5 to All on Tue Aug 23 08:39:59 2022
    Issue:
    Some of EDA tools crash when there is a space in the path. However, they are ok with relative paths.

    So while "file normalize" would be nice but if there is a space in the parent path, then it is a nonstarter. One thing that need to be able to do is compare two relative paths, such as ./flintstone/fred/../pebbles and flintstone/pebbles, and determine
    they are equivalent.

    Feature:
    file relative <path1> [<path2>] - return a path to <path1> as the shortest relative path to <path2>. If <path2> is not specified, then return a path to <path1> as the shortest relative path to [pwd].

    Maybe this exists somewhere and I just did not find it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerald Lester@21:1/5 to Jim Lewis on Tue Aug 23 11:32:33 2022
    On 8/23/22 10:39, Jim Lewis wrote:
    Issue:
    Some of EDA tools crash when there is a space in the path. However, they are ok with relative paths.

    So while "file normalize" would be nice but if there is a space in the parent path, then it is a nonstarter. One thing that need to be able to do is compare two relative paths, such as ./flintstone/fred/../pebbles and flintstone/pebbles, and determine
    they are equivalent.

    Feature:
    file relative <path1> [<path2>] - return a path to <path1> as the shortest relative path to <path2>. If <path2> is not specified, then return a path to <path1> as the shortest relative path to [pwd].

    Maybe this exists somewhere and I just did not find it?

    From TclLib I think you want: ::fileutil::relative base dst


    See: https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/fileutil/fileutil.md#27

    --
    +----------------------------------------------------------------------+
    | Gerald W. Lester, President, KNG Consulting LLC |
    | Email: [email protected] | +----------------------------------------------------------------------+

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From briang@21:1/5 to [email protected] on Tue Aug 23 14:35:51 2022
    On Tuesday, August 23, 2022 at 8:40:02 AM UTC-7, [email protected] wrote:
    Issue:
    Some of EDA tools crash when there is a space in the path. However, they are ok with relative paths.

    I hope you are reporting these errors to the EDA vendors! They should be fixing these bugs!!

    (been there, done that)
    -Brian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)