Skip to content

Deletion of subdirectory failed after directory was deleted #517

@p4p4

Description

@p4p4

Bug Description
after deleting a folder dir/, the action first removes dir/, and then attempts to remove dir/subdir/, which fails, because it does not exist any more.

My Action Config

  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/download-artifact@v4
        with:
          name: dist-folder
          path: dist
      # FTP Upload
      - name: FTP Upload
        uses: SamKirkland/FTP-Deploy-Action@4.2.0
        with:
          # from Settings → Secrets and variables → Actions → repository secrets
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          local-dir: ./dist/
          server-dir: /web_dir/
          protocol: ftps

My Action Log

removing folder "en/"
removing folder "en/404/"
----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------
FTPError: 550 Can't change directory to 404/: No such file or directory
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4744:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4585:44)
    at TLSSocket.emit (node:events:524:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions