Skip to content

[Bug]: Glob implementation incomplete #1241

@mm12

Description

@mm12

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha 9.5.6

Operating System & Version

Win11

Description

Glob does not work with characters that would allow more advanced searches. A cursory look at the symptoms makes it seem like strip_punctuation might be being called on the glob pattern. This is made more complicated by the amount of variation languages/libraries and shells have of glob, vs something more concrete like regex.

One or more of the following actions should take place:

  1. Resolve the issue allowing special characters in glob patterns
  2. Update tests to ensure glob rules do not fail
  3. Update documentation to specify which glob syntax types are and are not allowed
  4. Give the user meaningful error messages that may help if they are using an alternate glob syntax

Expected Behavior

Glob should correctly match the raw user-input pattern.

Steps to Reproduce

  1. Create a library with a path named in the format text-here-『space separated list of tags』. It doesn't matter what character you pick to enclose them, as long as it works on your filesystem
  2. Search for items with a given tag. Note that since there are not spaces around the start and end items, the appropriate regex is [『\s]tag[\s』]. The equivalent glob search may look like:
  • path:*{『, }tag{ ,』}* -> fails due to , and {}
  • path:*@(『| )tag@( |』)* -> fails due to ()
  • path:*[『]tag[ 』]* (fails to to [])
    or using [:space:] instead of a literal space.

Result: Invalid search syntax

Logs

2025-12-04 00:03:59 [error ] [QtDriver] Could not update BrowsingState error=Syntax Error 8->8: Syntax Error
2025-12-04 00:29:28 [error ] [QtDriver] Could not update BrowsingState error=Syntax Error 8->8: expected TokenType.EQUALS found TokenType.SBRACKETC
2025-12-04 00:22:41 [error ] [QtDriver] Could not update BrowsingState error=Syntax Error 10->10: Syntax Error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions