kornelski / pngquant

Lossy PNG compressor — pngquant command based on libimagequant library
https://pngquant.org
Other
5.19k stars 483 forks source link

"error: cannot open for writing" On long path windows #375

Closed Kl0ven closed 3 years ago

Kl0ven commented 3 years ago

Hi,

I get this error error: cannot open 'very\long\path\image9.png.tmp' for writing. I have tried to enable long path on windows but the explorer won't let me create those files manualy, but a python script can!! I'm not sure if it's a pngquant issue or a Windows limitation.

I'm using

kornelski commented 3 years ago

For Windows paths I use Microsoft's C standard library. It doesn't handle Unicode paths, so I'm not surprised that it doesn't handle long paths either.

I have a plan to rewrite that part in Rust, which will fix both issues.