• src/xpdev/dirwrap.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, April 29, 2024 22:02:01
    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 Friday, December 06, 2024 13:17:19
    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 Tuesday, December 10, 2024 16:27:55
    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 Saturday, December 21, 2024 22:58:59
    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 Sunday, December 22, 2024 00:50:13
    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 Wednesday, January 15, 2025 22:32:42
    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 Wednesday, January 15, 2025 23:04:56
    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 Tuesday, February 04, 2025 21:25:43
    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 Saturday, February 08, 2025 13:21:24
    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
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Saturday, December 27, 2025 01:17:57
    https://gitlab.synchro.net/main/sbbs/-/commit/1d1f7a32c3f216063e232728
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    Fix off-by-one bug in size argument to strlcpy()

    As noted in strlcpy man page: "a byte for the NUL should be included in size."

    ---
    þ 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 Thursday, July 02, 2026 21:40:51
    https://gitlab.synchro.net/main/sbbs/-/commit/6fdf8828782a16d7dc633bf5
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    getfilecase(..., true) return false if the path is a file (not a directory)

    SCFG uses getdircase() which calls getfilecase(..., true) to determine if the specified path is a directory (and fix its case if wrong). The underlying function returned true on *nix even if the path was a file (without wildcards) and not a directory, but worked as expected on Windows.

    This caused exporting message lists (e.g. to ../data/areas.bbs) to not prompt for overwrite/append but just complain that the "Directory exists" (when it
    was not actually a directory).

    Reported by Nelgin in IRC

    ---
    þ 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 Sunday, July 26, 2026 23:08:15
    https://gitlab.synchro.net/main/sbbs/-/commit/d394e7bef6a9b4045a3f3f13
    Modified Files:
    src/xpdev/dirwrap.c
    Log Message:
    xpdev: copy a file's permissions along with the file

    CopyFile() creates the destination with fopen(dest, "wb"), so it was born
    with mode 0666 & ~umask and the source's permission bits were dropped.
    Copying an executable therefore produced a file that could not be
    executed -- a door binary installed this way failed at launch with
    "ERROR 13 (Permission denied)", and nothing about the copy step said why.

    This is the POSIX stand-in for the Win32 API of the same name, which
    preserves the source's attributes, so the two platforms disagreed on what file_copy() means. The function also already went to the trouble of
    preserving the source's modification time; permissions were the omission.

    fstat() the source and fchmod() the destination to match. The mode is
    masked to 0777: set-user-ID and set-group-ID bits are deliberately left
    behind rather than propagated to a copy.

    Measured before and after against source modes 0755, 0770, 0600, 0666 and
    04755 under umask 022: every destination was 0644 before, and now matches
    its source (with 04755 landing as 0755).

    GitLab #1202.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

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