Skip to content

Ignore Only Works Correctly in every scenario with --no-folding #131

@Educpf

Description

@Educpf

Description

Any method to exclude specific files in Stow is only respected if --no-folding is also used. Without --no-folding, Stow may create a symlink for the whole package folder, ignoring the file-level exclusions.

Steps to Reproduce

  1. Create a package folder with some files such that stowing would normally create a folder link (folding).

  2. Create a test file in your package folder, e.g., something.ignore.

  3. Run:

    stow -R --ignore='\.ignore$' mypackage
  4. Observe that something.ignore is still linked.

  5. Now run:

    stow --no-folding --ignore='\.ignore$' mypackage
  6. Observe that something.ignore is correctly ignored.

Expected Behavior

The --ignore flag should work regardless of the --no-folding option. Stow should automatically detect that folding isn't possible due to ignored files.

Actual Behavior

Files matching the --ignore pattern are only ignored if --no-folding is used, or if the file layout naturally prevents folding.

Environment

  • GNU Stow version: 2.4.1
  • OS: Arch Linux

Notes

This behavior is reproducible with .stow-local-ignore and .stow-global-ignore as well—--no-folding is required for file-level ignores to be respected. This appears to be a bug in how Stow handles folding versus individual file ignores.

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