• postfile.js should allow duplicates

    From Fernando Toledo@VERT to GitLab issue in main/sbbs on Friday, December 06, 2024 13:11:01
    open https://gitlab.synchro.net/main/sbbs/-/issues/836

    I need to add a file to 2 file areas, one "local" and other "networked" fix tic/ftn

    I have to upload a file to both areas and then I regenerate it and have to overwrite it

    ```
    /sbbs/exec/jsexec postfile fidoz4daily zone4.341 "Z4 Daily Nodelist bla" Ragnarok
    /sbbs/exec/jsexec postfile fidozsegs zone4.341 "Z4 Nodelist bla" Ragnarok
    ```

    ```
    !File 'zone4.341' already added.
    !Module (postfile) set exit_code: 1
    ```

    What would be the best option?

    * Any chance that postfile can replace the current one (adding new option like -replace) ?
    * Should I delete it first?
    * Or could I use addfiles in this case?

    I know this creates a duplicate in my file database, but for now it is something desired.
    Thanks!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, December 08, 2024 21:12:49
    https://gitlab.synchro.net/main/sbbs/-/issues/836#note_6125

    If the file is already in the filebase, I'm clear not clear why you want to re-add it. Just to update the file description?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, December 08, 2024 21:13:00
    https://gitlab.synchro.net/main/sbbs/-/issues/836#note_6125

    If the file is already in the filebase, I'm not clear why you want to re-add it. Just to update the file description?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, December 08, 2024 22:55:25
    https://gitlab.synchro.net/main/sbbs/-/issues/836#note_6126

    If you just want update an existing file, there is the existing script: `updatefiles.js`, you could take a look at that/try it. It might make more sense to use that script (or one like it) rather than `postfiles.js` or `addfiles.js` to update an existing file description.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Fernando Toledo@VERT to GitLab note in main/sbbs on Monday, December 09, 2024 08:02:00
    https://gitlab.synchro.net/main/sbbs/-/issues/836#note_6127

    I regenerate the file, and must overrite it, so I need to update the file because size/description can be different

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Fernando Toledo@VERT to GitLab note in main/sbbs on Monday, December 09, 2024 08:02:42
    https://gitlab.synchro.net/main/sbbs/-/issues/836#note_6128

    I hadn't taken that into account, I'll check it out, thanks!

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