Skip to content

Fix: match .zip extension case-insensitively in IsZipFilePath - #4734

Merged
DavidGBrett merged 1 commit into
Flow-Launcher:devfrom
b84330808:fix-zip-path-extension-case
Nov 2, 2026
Merged

DavidGBrett merged 1 commit into
Flow-Launcher:devfrom
b84330808:fix-zip-path-extension-case

Conversation

@b84330808

@b84330808 b84330808 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

FilesFolders.IsZipFilePath compared the text after the last dot with "zip" case-sensitively, so pm install C:\Downloads\Plugin.ZIP wasn't recognized as a local plugin package and fell through to the manifest search. Windows extensions are case-insensitive, so it now uses Path.GetExtension with OrdinalIgnoreCase. Added test cases to FilesFoldersTest.

I used Claude Code to write this change.


Summary by cubic

Summary of changes

Fixes FilesFolders.IsZipFilePath so plugin packages with uppercase .ZIP extensions are correctly recognized as local plugin packages.

  • Changed: Extension detection now uses Path.GetExtension with OrdinalIgnoreCase, matching Windows's case-insensitive file extension behavior.
  • Removed: The previous case-sensitive check that compared querySearchString.Split('.').Last() == "zip".
  • Memory usage: No impact; no additional allocations beyond the standard Path.GetExtension call.
  • Security: No impact; no new input handling or privilege changes.
  • Tests: Added 7 test cases covering mixed-case extensions, UNC paths, non-zip extensions, and relative paths.

Release Note

Fixes an issue where plugin installs from local .ZIP files with uppercase file extensions were not recognized.

Written for commit a66317c. Summary will update on new commits.

View guided diff

IsZipFilePath compared the text after the last dot with "zip"
case-sensitively, so a local plugin package such as
C:\Downloads\Plugin.ZIP was not recognized by "pm install" / "pm update"
and the query fell through to the manifest search. Windows file
extensions are case-insensitive, so compare with Path.GetExtension and
OrdinalIgnoreCase.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added this to the 2.2.0 milestone Nov 2, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 749e88e4-4bc7-4326-aa98-7f8d5d07da13
Commits

Reviewing files that changed from the base of the PR and between 4622fbe and a66317c.

Files selected for processing: 2
  • Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
  • Flow.Launcher.Test/FilesFoldersTest.cs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

IsZipFilePath now recognizes .zip extensions regardless of letter case. Parameterized tests cover accepted ZIP paths and paths that should be rejected.

Changes: ZIP path detection

Layer / File(s) Summary
ZIP extension detection and validation
Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs, Flow.Launcher.Test/FilesFoldersTest.cs
IsZipFilePath checks the extension case-insensitively. Tests cover mixed-case extensions, a UNC path, and rejection of .zip.txt, extensionless, and filename-only paths.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: jjw24, jack251970

Merge Risk: Minimal · up to a6631

The ZIP path detection update is narrowly scoped and ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: case-insensitive matching of the .zip extension in IsZipFilePath.
Description check Passed The description directly explains the bug, the fix, and the added tests. It is related to the changeset.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@DavidGBrett DavidGBrett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks for the fix

@DavidGBrett
DavidGBrett merged commit 947ba49 into Flow-Launcher:dev Nov 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants