• nodelist_handler.js cannot handle non-archived nodelists

    From Fernando Toledo@VERT to GitLab note in main/sbbs on Saturday, February 17, 2024 20:14:34
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4864

    Hi @nelgin, I made this ugly patch on exec/load/tickit/file_handler.js to fallback copy file if archive format was not detected. Maybe @rswindell can help us to cleanup and write better code.

    It working for my for Hobbynet that delivery HOBBYNET.ZIP (for echolist) and HOBBYNET.??? (unpacket file for nodelist)

    my tickt.ini config for hobbynet:

    ```
    [HNET_NODE]
    Dir=hnet_node
    SourceAddress=954:895/37@hobbynet
    AKAMatching=true
    ForceReplace=true
    Handler=tickit/file_handler.js
    HandlerArg = { "match": "HOBBYNET*", "files": [{ "source": "HOBBYNET.*", "destination": "/sbbs/fido/NODELIST.HOBBYNET" }]}

    [HNET_INFO]
    Dir=hnet_info
    SourceAddress=954:895/37@hobbynet
    AKAMatching=true
    ForceReplace=true
    Handler = tickit/file_handler.js
    HandlerArg = { "match": "HOBBYNET.ZIP", "files": [{ "source": "HOBBYNET.NA", "destination": "/sbbs/fido/ECHOLIST.HOBBYNET" }]}

    ```


    ```diff
    --- file_handler.js.orig 2020-08-26 18:19:00.000000000 -0300
    +++ file_handler.js 2024-02-18 00:56:33.272600403 -0300
    @@ -107,8 +107,7 @@ function Handle_TIC(tic, ctx, arg) {
    f.close();

    if (unpack == undefined) {
    - log(LOG_ERROR, 'Unable to identify packer for ' + tic.file);
    - return false;
    + log(LOG_INFO, 'Unable to identify packer for ' + tic.file);
    }

    // Create a directory to extract to...
    @@ -129,10 +128,28 @@ function Handle_TIC(tic, ctx, arg) {
    }
    }

    - if (!run_and_log(unpack, tic.full_path, dir)) return false;
    + if (unpack == undefined) {
    + log(LOG_DEBUG, "No packer, direct copy file");
    + var sf = tic.full_path;
    + var df = backslash(dir) + tic.file;
    + if (!file_copy(sf , df)) {
    + log(LOG_ERROR, 'Failed to copy no packed file: ' + sf + ' to ' + df);
    + return;
    + }
    + }
    + else {
    + if (!run_and_log(unpack, tic.full_path, dir)) return false;
    + }

    cfg.files.forEach(function (e) {
    - var sf = backslash(dir) + e.source;
    + var sf;
    + if (unpack == undefined) {
    + log(LOG_DEBUG, "Using file: " + tic.file);
    + sf = backslash(dir) + tic.file;;
    + }
    + else {
    + sf = backslash(dir) + e.source;
    + }
    const df = e.destination;
    if (!file_exists(sf)) {
    log(LOG_ERROR, e.source + ' not found in ' + tic.file);

    ```
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Saturday, February 17, 2024 22:35:22
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4870

    Cool. You might want to clone the repo and then commit a change. It's usually going to get looked at faster rather than wait for someone to apply a diff.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Monday, September 29, 2025 09:12:08
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_7678

    Maybe the answer is for packer to identify a file as plain text if it cannot identify a valid packer.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net