Skip to content

[Bug]: cleanup directive in manifest does not delete directories ending with / #476

@Yvan-Masson

Description

@Yvan-Masson

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

flatpak-builder version

1.2.2

Flatpak version

1.12.7

How to reproduce

Take a sample manifest like this one (which is missing here required dependencies to speed up build):

app-id: fr.masson_informatique.WhosWho
runtime: org.gnome.Platform
runtime-version: '42'
sdk: org.gnome.Sdk
command: whoswho
cleanup:
  - "/bin/"
finish-args:
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --talk-name=org.gtk.vfs.*
  - --filesystem=xdg-run/gvfsd

modules:
  - name: WhosWho
    buildsystem: simple
    build-commands:
      - ./build-translations.py
      - pip3 install --prefix=${FLATPAK_DEST} --no-deps .
    sources:
      - type: archive
        url: https://framagit.org/Yvan-Masson/WhosWho/-/archive/v1.4/WhosWho-v1.4.tar.gz
        sha256: e022b5053c41cf3e70d78ccc695983a5a1bfebf696b4d54a3dad4a2d02df8199

Note that removing /bin in cleanup is again just for the test.

Expected Behavior

Directory /bin should be deleted.

Actual Behavior

In this case /bin/ is not deleted. However, if you remove the trailing /, it is.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions