• src/xpdev/dirwrap.c

    From deuce@VERT to CVS commit on Tue Apr 14 04:56:07 2020
    src/xpdev dirwrap.c 1.111 1.112
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv1415

    Modified Files:
    dirwrap.c
    Log Message:
    Only copy up to MAX_PATH characters to each component in _splitpath()
    Fixes coverity warning in SyncTERM... matches the size all callers currently use.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon May 25 15:15:09 2020
    src/xpdev dirwrap.c 1.112 1.113
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv23403

    Modified Files:
    dirwrap.c
    Log Message:
    Typo in comment.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Dec 22 15:38:19 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/438f8540ee3a55d28daa99c2
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Comment block update. No code change.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Feb 22 00:29:05 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/29b2cb05145f9663cb9b3d1b
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    CopyFile() for *nix now copies the file modification date/time too.

    to mimic the behavior of the Win32 API function of the same name.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Jun 6 00:04:44 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/23d36a634b40b71178cfc374
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix delfiles() to delete files starting with '.' (that match the pattern)

    glob() by default, doesn't include 'dot files', so include the GLOB_PERIOD
    flag so that when deleting all files in a directory (e.g. node1/temp/*), any files starting with a dot will be deleted too.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Jun 6 00:25:38 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/29cef0e7ad7f1208b5fcd0d0
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    I guess GLOB_PERIOD is Linux or GNU extension. <shrug>

    Fix FreeBSD build error:
    dirwrap.c:760:13: error: use of undeclared identifier 'GLOB_PERIOD'
    Not sure how glob() on FreeBSD treats "dot files" or how to control that.
    ---
    ■ 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 14:58:21 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/efa03b7873c4bbb8500cee65
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    delfiles() now removes files and directories, recursively
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Mar 25 10:21:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/30cf70e9542d8ef446a50f46
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Uh, increment the pointer in globi()

    Fixes crash reported in #381.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Mar 27 10:24:22 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/529912b6399acf676de90888
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Only filename portion of pattern for globi() shall be case-insensitive

    Windows doesn't allow multiple directories of the same name only differing in case, so don't on *nix either.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Mar 28 01:41:35 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/c4fc80abfaa27ffcc7980d61
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix the globi() change for *nix

    I was stripping the path here... oops.
    ---
    ■ 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 01:16:22 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/f4753d2f0446bd0ef32662d0
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Use the pointer *after* checking that its not NULL

    Fixes CID 351271
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Mon Mar 13 18:31:32 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/5ea2eeb311f22a1e5f826882
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    If delfiles() is called with a NULL spec, assume "all files" (*)
    ---
    ■ 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 Sat Jan 20 14:29:14 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/d9d140af60f18552e07150de
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix disksize/space functions for Win32

    Broken 11 months ago with commit ae44ab15: the unit argument was ignored (e.g. converting to kibibytes) and the free/total disk size/space checks were reversed.

    Reported by Max (WESTLINE) via usage of JS properties: system.freediskspace and system.freediskspacek.

    The JS global functions dir_freespace() and disk_size() were also broken due to this bug.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Jan 21 14:28:18 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/095858e5c974d1e6265f0b65
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Set size to MAX_PATH+1 when allocating.

    On Win32, size is explcitly "ignored" when target is NULL, so we
    should set it to the size of the allocation.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Feb 24 08:40:35 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/cb0dbdaf0928ea962e5b8c9d
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix glob() for Win64

    _fintfirst() is declared in the Mingw-w64 headers as an intptr_t,
    which tracks. Can't find _findfirst on MSDN, so that's good enough
    for me... let's see what the pipeline says.
    ---
    ■ 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 Mon Apr 29 22:02:01 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/bf757d6952f7ac30b9f0c819
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Not every platform has GLOB_ONLYDIR support

    ... kind of as I suspected
    ---
    ■ 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 Fri Dec 6 13:17:19 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/abac966eec71a2f3af83ae6c
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Optimize mkpath()

    If the path already exists (is a directory), don't need to check each path element for existence.

    This should help with the speed of saving of large file.ini (Nelgin's) when a lot of directories have "Check for File Existence" set to "Yes".
    ---
    ■ 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 Tue Dec 10 16:27:55 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5e025ef3f92105834d4c7178
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix bug in recursive use of delfiles(), not deleting all subdirs/files

    Looks like this feature (commit d661427e13) never really worked correctly
    since it counted the files removed from each sub-dir and then stopped deleting when the count reached the number of files in the base directory. This was
    done to accommodate the 'keep' feature (part of previous commits).
    So make 'keep' check conditional on it being non-zero and just don't ever use
    a non-zero keep value with a recursive delete and we should be good! :-)

    This fixes issue #841
    ---
    ■ 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 Sat Dec 21 22:58:59 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/c82eff12b58be6dca245c599
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Comment out access() call in Windows version of getfilecase()

    I'm hoping this might help resolve instances where fexistcase() says a file does not exist, but a subsequent call to fexist() says it does.
    ---
    ■ 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 Sun Dec 22 00:50:13 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/e7cfae3e9ad94036156dd0ba
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    A little style clean-up, reduced copy/paste, no functional changes

    Reduce the cognitive dissonance
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on macOS)@VERT to Git commit to main/sbbs/master on Wed Jan 15 22:32:42 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/33be8662a0d67a0ced7f0658
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Add some temporary debug output to find the mac mini m4 hang
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on macOS)@VERT to Git commit to main/sbbs/master on Wed Jan 15 23:04:56 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/41169123a99ebff32f28720c
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Revert "Add some temporary debug output to find the mac mini m4 hang"

    This reverts commit 33be8662a0d67a0ced7f06587fdec01a27b818a8.
    ---
    ■ 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 Tue Feb 4 21:25:43 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/dfef8a98c12122a8d7441561
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Remove pre-WinXP support from getdiskspace()

    No need to use LoadLibrary and GetProcessAddress here any more either
    ---
    ■ 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 Sat Feb 8 13:21:24 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f1f7b121785f300b994927ef
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Use strlcpy instead of sprintf("%.*s") string truncation trick

    Resolves MSVC x64 build warnings.

    Also fixes a bug with wrong sizeof argument used in readdir() (!)
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net