• src/sbbs3/filedat.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Jan 3 19:11:06 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/0553ef9b362cd580092cade6
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    The simpler fix to issue #317 (nested DIZ files)

    By extracting with with_path=true, the file_list matching won't match the nested DIZ files.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Jan 10 19:55:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/60e4d7af2800557e2435af16
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    loadfiles() will perform liberal filename matching when len > 12 chars

    As discovered while making the Synchronet v3.18b feature video (https://www.youtube.com/watch?v=_IWzIV0_sZ4), when only a shortened version of a long filename is displayed (e.g. due to 80 column terminal width limitations), trying to download that filename by specifying the filename at the Download File(s) Filespec [All Files]: prompt can be problematic.

    For example (as seen in the video), the file "SyncTERM-1.1-setup.exe" is displayed as "SyncTERM.exe" (on an 80-column terminal), yet trying to download "SyncTERM.exe" (or "syncterm.exe") using the 'D'ownload command would fail to find a file with that name (understandably, but frustratingly so).

    This change will transform the requested filename-to-load if it is at least 12 characters in length and contains no wildcards (* or ?), to include a filename extending wildcard: "filename.txt" will become "filename*.txt" and "longfilename" will become "longfilename*".

    For requested filespecs of NULL (all files) or specs containing wildcards or specs (filenames) less than 12 characters in length, no filespec transform takes place: so trying to list/download "a" doesn't match "apple.txt".

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Jan 13 19:06:35 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/063d470031c30c732d27caf8
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Address Coverty reported issue about dereferencing a NULL pointer

    CID 345291
    It's actually a false positive because if an extension (".suffix") exists in filespec, it must also exist in newfilespec since it's a copy, but whatever. It's better form to check.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jan 15 20:14:02 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/27f8668cd1429dd8b03b87af
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Fix printf format issue in previous commit.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Jan 23 13:44:55 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/77e2d88edb57a1f4c06ee4ed
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    create_archive() will skip directories in supplied file_list

    The file_list[] parameter was expected to contain only files, but the directory() function (used to create that file_list[]) returns a list of all directory entries, including sub-directories. I could (and maybe will) add an option to directory() to only include files or dirs, but this seemed the more direct fix for the problem reported by DesotoFireflite (VALHALLA):

    TickIT's nodelist_handler.js appears to be creating and leaving behind a sub-directory of the temp directory, triggering this error:
    1/23 11:36:56a QNET libarchive error -1 (13 opening c:\SBBS\temp\event\nodelist_handler/) creating c:\SBBS\data\VERT.REP

    Why isn't the temp directory fully cleaned up after/between events? That's another thing to look into.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed Feb 23 00:19:23 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/067556d75a33774e350ecae7
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Strip CP437 "graphics" characters in prep_file_desc()

    If the extended description is UTF-8, first convert it to CP437.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Mar 1 22:43:08 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/4bb4130cd565b4945a999f43
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Add some NULL argument value checking

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Mar 29 20:18:45 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/59200e330f416573be8a49d1
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Some archives don't have DIZ in the root directory

    (I'm looking at you, mist1221.zip)

    ... so first try to extract DIZ files from the root of the archive, then try again searching nested directories too. <sigh>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Mar 31 18:59:38 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/67d3c3e2c8db7368570944e2
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Fix file list sorting by date, need to use the index not the header

    When loadfiles() calls sortfiles(), only the file's index records have been read in, so trying to sort on any header field won't work.

    This bug wasn't observable when sorting by date ascending, since that's the natural index order of the files already (order imported/added), only
    observed when sorting by date descending (newest at the top).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Aug 2 17:20:24 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/bff68ad04b5051effdd82bb0
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Check max_files value in extract_files_from_archive() better

    Address issue reported by Nightfox via DOVE-Net:
    Today I was using the Archive class to extract exactly one file from a zip file, and I'm a little confused on the exception throwing behavior regarding the max_files parameter. When calling extract(), I gave it a filename pattern and expected exactly 1 file to be extracted, so I also gave a max_files argument as 1. It extracted the one file, but it threw an exception with the error "Error: maximum number of files (1) extracted (after extracting 1 item successfully)".

    Should that be an error condition to throw an exception? I expected 1 file to be extracted, and that file was extracted successfully. If I specify max_files as 2, then it doesn't throw an exception.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Feb 4 17:13:14 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/ef2fa232ddcb2cef11c7458a
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    If filename_maxlen is 0, don't use it enforce a maximum filename length

    This is just extra paranoia now since the reading of file.ini enforces the value range
    8 <-> 65535 now.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Thu Mar 2 18:56:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/9a57677a496ff570f4038cd2
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Avoid possible divide-by-zero in gettimetodl()

    Default to 100000 (cps) if passed a rate_cps argument value of 0.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Feb 12 10:27:35 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/31ded19d6a8e8933b9f999e4
    Modified Files:
    src/sbbs3/filedat.c
    Log Message:
    Resolve warning: enumeration value `FILE_SORT_NATURAL' not handled in switch

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