fix(backend): Windows executable file extension resolution in resolve_binary #85

Closed
opened 2026-08-25 15:47:29 +01:00 by gronod · 1 comment
Owner

Problem Description

On Windows, resolve_binary in src-tauri/src/commands.rs constructs paths using raw binary names ("targen", "printtarg", "chartread", etc.) without checking for the .exe extension:

  1. When checking custom Argyll directories (settings.argyll_binary_dir), Path::new(&dir).join(&binary_name) checks dir\targen, which returns false on custom_path.exists() if the executable on disk is targen.exe.
  2. When resolving bundled resources, app.path().resolve(format!("argyll/{}/{}", platform, binary_name), BaseDirectory::Resource) resolves without .exe.

Acceptance Criteria

  • On Windows, resolve_binary checks both binary_name and format!("{}.exe", binary_name).
  • Custom directory lookups in settings successfully resolve .exe binaries.
  • Bundled resource resolution successfully locates .exe binaries on Windows.
  • Unit tests added covering Windows binary resolution edge cases.

Dependencies & Ordering

  • Milestone: Milestone 8 (v0.3.0)
  • Ordering: Step 1 (Prerequisite for all subsequent Stage 3 and toolchain integrations)
  • Dependencies: None
### Problem Description On Windows, `resolve_binary` in `src-tauri/src/commands.rs` constructs paths using raw binary names (`"targen"`, `"printtarg"`, `"chartread"`, etc.) without checking for the `.exe` extension: 1. When checking custom Argyll directories (`settings.argyll_binary_dir`), `Path::new(&dir).join(&binary_name)` checks `dir\targen`, which returns `false` on `custom_path.exists()` if the executable on disk is `targen.exe`. 2. When resolving bundled resources, `app.path().resolve(format!("argyll/{}/{}", platform, binary_name), BaseDirectory::Resource)` resolves without `.exe`. ### Acceptance Criteria - [ ] On Windows, `resolve_binary` checks both `binary_name` and `format!("{}.exe", binary_name)`. - [ ] Custom directory lookups in settings successfully resolve `.exe` binaries. - [ ] Bundled resource resolution successfully locates `.exe` binaries on Windows. - [ ] Unit tests added covering Windows binary resolution edge cases. ### Dependencies & Ordering - **Milestone**: Milestone 8 (`v0.3.0`) - **Ordering**: Step 1 (Prerequisite for all subsequent Stage 3 and toolchain integrations) - **Dependencies**: None
gronod added this to the Milestone 8: Advanced Measurement & Workflow Enhancements (v0.3.0) milestone 2026-08-25 15:47:29 +01:00
gronod added the Kind/Bug
Priority
High
2
labels 2026-08-25 15:47:29 +01:00
gronod added the
Reviewed
Confirmed
1
label 2026-08-25 16:46:18 +01:00
Author
Owner

Resolved in PR #97. Windows .exe candidate resolution is now supported for both custom directory settings and bundled resource directories.

Resolved in PR #97. Windows `.exe` candidate resolution is now supported for both custom directory settings and bundled resource directories.
Sign in to join this conversation.