• KEGS' DynaPro feature drops trailing periods in filenames.

    From Brian Patrie@21:1/5 to All on Wed Jun 8 23:55:39 2022
    I use trailing periods in ProDOS filenames from time to time (usually to indicate that something has been modified from it's original form); but,
    on a DynaPro mounted directory, odd things happen, and they ultimately
    get dropped.

    My current main usage of DynaPro is for using a host-native text editor
    to edit text files; so it's only a minor inconvenience. But it would be
    nice to see it eventually fixed.

    It would also be nice if at least some of the ProDOS permission bits
    were preserved somehow. But again, i can live with it as is for now; so
    no rush.

    :)

    I'm using KEGS v1.16, under Linux Mint, btw.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to bpatrie@bellsouth.spamisicky.net on Mon Jun 13 14:27:07 2022
    In article <t7rugd$h9l$1@gioia.aioe.org>,
    Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote:
    I use trailing periods in ProDOS filenames from time to time (usually to >indicate that something has been modified from it's original form); but,
    on a DynaPro mounted directory, odd things happen, and they ultimately
    get dropped.

    My current main usage of DynaPro is for using a host-native text editor
    to edit text files; so it's only a minor inconvenience. But it would be
    nice to see it eventually fixed.

    It would also be nice if at least some of the ProDOS permission bits
    were preserved somehow. But again, i can live with it as is for now; so
    no rush.

    :)

    I'm using KEGS v1.16, under Linux Mint, btw.

    This was an unfortunate bug in KEGS caused by the routine trying to legalize names from your host Linux system to be valid ProDOS names.

    When a character which is not valid for ProDOS was found in the native
    name (say, en emoji, a space, anything other than A-Za-z0-9 or .), KEGS
    would convert that character to a '.' in the ProDOS name.

    So a name like "file (9)" would become "file..9.". So then KEGS tried to eliminate '.'s at the end of the filename since they weren't useful, to
    create "file..9" in this example.

    But: if the native name already had a dot at the end, this was a legal
    ProDOS name, but KEGS was still tossing it. So "TRY1." would be changed
    to "TRY1". This is the bug you found.

    I just made the step for converting unknown characters to '.' remember which ones were real '.'s and which ones are converted characters, so "TRY1."
    stays "TRY1." but "file (9)" becomes "file..9" still.

    I'm not sure when the next KEGS release will be. If you want an immediate
    fix and can recompile, edit dynapro.c around lines 1369-1372 to remove these lines:

    while((outpos >= 0) && (g_dynapro_path_buf[outpos-1] == '.')) {
    outpos--;
    g_dynapro_path_buf[outpos] = 0;
    }

    This the code removing the trailing '.' from the end of the filename, and
    it's what's causing your problem. Without this code, native name "file (9)" will become "file..9.", but that's not really a problem.

    Kent

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Patrie@21:1/5 to Kent Dickey on Wed Jun 15 03:55:48 2022
    Kent Dickey wrote:
    If you want an immediate fix and can recompile, edit dynapro.c
    around lines 1369-1372 to remove these lines:

    while((outpos >= 0) && (g_dynapro_path_buf[outpos-1] == '.')) {
    outpos--;
    g_dynapro_path_buf[outpos] = 0;
    }

    This the code removing the trailing '.' from the end of the
    filename, and it's what's causing your problem. Without this
    code, native name "file (9)" will become "file..9.", but that's
    not really a problem.

    Excellent! Thanks! :)
    And, of course, i named the modified version "xkegs-1.16." ;)

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