Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive not working on Windows #170

Closed
alecmeelan opened this issue May 28, 2019 · 6 comments · Fixed by #537
Closed

Recursive not working on Windows #170

alecmeelan opened this issue May 28, 2019 · 6 comments · Fixed by #537
Labels
I-Medium Issues that are breaking core functionality, but have a known workaround T-Bug Some piece of the software is not working as intended

Comments

@alecmeelan
Copy link

The recursive option doesn't work and says failed to open file for reading.
Version is oxipng 2.2.0
This is the output

konack@DESKTOP:/mnt/c/users/accounting2/pictures/test$ ls Screenshots
desktop.ini  s.png
konack@DESKTOP:/mnt/c/users/accounting2/pictures/test$ oxipng *.png --opt 4 --recursive
Processing: *.png
Failed to open file for reading
@shssoichiro
Copy link
Owner

I wonder if it's specific to using --recursive with wildcards. Which shell are you using? Some shells also do automatic expansion of wildcards which can cause interesting behaviors as well.

@shssoichiro shssoichiro added I-Medium Issues that are breaking core functionality, but have a known workaround T-Bug Some piece of the software is not working as intended labels Jun 7, 2019
@cklosowski
Copy link

Is it possible that an exit code is being thrown when it shouldn't? Just noticing that if I try and run on a structure like this from the 2012 directory:

- 2012
-- 01
-- 02
-- 03

The system exits immediately stating there were no matches. Wondering if the wildcard is throwing an exit 1 when it should really be continuing when --recursive is used.

@emphaticism
Copy link

emphaticism commented Jul 8, 2020

Using a test structure as follows

-test
--1
--2
--3
---test.png
"oxipng -r -o 6 test/" - runs correctly on this
"oxipng -r -o 6 test/ *.png" - fails immediately

This behavior wouldn't be too bad if oxipng could ignore any files that don't have PNG headers and keep going, but if a file is passed without a png header the program will exit regardless of how many more files need to be checked. Fixing the wildcard issue won't fix this behavior fully as there are cases where files may be labeled .png but really be some other file.

I've tried extending error handling to not exit on bad header data but my ability with rust is lacking.

@Mae72DE
Copy link

Mae72DE commented Mar 22, 2022

I got the same problem:

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -r -P C:\*.png
Processing: C:\*.png
Failed to open file for reading

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -r -P C:\

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -P -V -r C:\
oxipng 5.0.1

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -P -v -r C:\

… and it don't tell me what's going wrong!

@shssoichiro
Copy link
Owner

Seems like the remaining issue might be windows specific. I'll see what I can do.

@shssoichiro shssoichiro reopened this Mar 22, 2022
@shssoichiro shssoichiro changed the title Recursive not working Recursive not working on Windows Mar 22, 2022
@checkraisefold
Copy link

I got the same problem:

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -r -P C:\*.png
Processing: C:\*.png
Failed to open file for reading

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -r -P C:\

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -P -V -r C:\
oxipng 5.0.1

C:\oxipng-5.0.1-x86_64-pc-windows-msvc> oxipng -P -v -r C:\

… and it don't tell me what's going wrong!

Can reproduce on my Windows 10 machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-Medium Issues that are breaking core functionality, but have a known workaround T-Bug Some piece of the software is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants