Skip to content

File paths with spaces cause early command splitting on Windows CMD #798

@jonnyawsom3

Description

@jonnyawsom3

'Solid' file path.

hyperfine -r 1 --show-output -i "djxl "C:\Users\jonat\Downloads\Test.jxl" --disable_output"
Benchmark 1: djxl C:\Users\jonat\Downloads\Test.jxl --disable_output
JPEG XL decoder v0.12.0 3d7cec2 [AVX2,SSE2]
Decoded to pixels.
4100 x 4000,  98.436 MP/s [98.44, 98.44], , 1 reps, 16 threads.
  Time (abs ≡):        210.1 ms               [User: 1951.6 ms, System: 275.0 ms]

With a single space.

hyperfine -r 1 --show-output -i "djxl "C:\Users\jonat\Downloads\Te st.jxl" --disable_output"
Benchmark 1: djxl C:\Users\jonat\Downloads\Te
JPEG XL decoder v0.12.0 3d7cec2 [AVX2,SSE2]
couldn't load C:\Users\jonat\Downloads\Te
  Time (abs ≡):         15.7 ms               [User: 0.0 ms, System: 9.1 ms]

  Warning: Ignoring non-zero exit code.

Benchmark 2: st.jxl --disable_output
'st.jxl' is not recognized as an internal or external command,
operable program or batch file.
  Time (abs ≡):         11.5 ms               [User: 0.0 ms, System: 0.0 ms]

  Warning: Ignoring non-zero exit code.

Summary
  st.jxl --disable_output ran
    1.37 times faster than djxl C:\Users\jonat\Downloads\Te

The file path is split into separate commands with every additional space, making it quite hard to benchmark files without first moving and renaming them.

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