You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
After I finished the thumbnail tutorial, I tried to test it and got this error
Error: No files match pattern `rust_memes/*`
After seeing that, I progressively commented out more code to get a minimal reproduction, and I was able to find that this block of code doesn't match anything
use quicli::prelude::*;fnmain() -> CliResult{let files = glob("src/*")?;println!("{:?}", files);Ok(())}
~/dev/rust/thumbify master
❯ cargo run --
Compiling thumbify v0.1.0 (/home/chris.pickard/dev/rust/thumbify)
Finished dev [unoptimized + debuginfo] target(s) in 1.11s
Running `target/debug/thumbify`
Error: No files match pattern `src/*`
Even though I clearly have matching files in my src/ directory
~/dev/rust/thumbify master
❯ ls src
main.rs
I'm sorry, I feel like I'm quite a thorn in your side at the moment
The text was updated successfully, but these errors were encountered:
Hey, no worries, I'm very glad you open these issues! 0.4 contained an updated glob function, and I think there might be some issues with that. I'll try to investigate!
If you want to get this working without using quicli's glob, you can try to a use the glob crate directly (or another one that does the same), or play around with using std::fs::read_dir :)
It looks as if it's because of glob's max_depth(1) call. Removing allows the following (previously non-working) patterns with subdirectories ("dir/file", "*/file" and "**/file"). It does find files in subdirectories with simple patterns ("*.png") though, which it did not before.
It would be possible to add the max_depth call only when a '/' is in the pattern. What do you think?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
After I finished the thumbnail tutorial, I tried to test it and got this error
After seeing that, I progressively commented out more code to get a minimal reproduction, and I was able to find that this block of code doesn't match anything
Even though I clearly have matching files in my
src/
directoryI'm sorry, I feel like I'm quite a thorn in your side at the moment
The text was updated successfully, but these errors were encountered: