Skip to content

Commit 460c45c

Browse files
committed
Improve glob support
1 parent 607b7e7 commit 460c45c

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

Cargo.lock

Lines changed: 8 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lodepng = { version = "3.7.2", optional = true }
3535
pbr = { version = "1.1.1", optional = true }
3636
resize = "0.8.2"
3737
rgb = "0.8.36"
38-
wild = { version = "2.1.0", optional = true }
38+
wild = { version = "2.2.0", optional = true, features = ["glob-quoted-on-windows"] }
3939
natord = { version = "1.0.9", optional = true }
4040
quick-error = "2.0.1"
4141
dunce = { version = "1.0.4", optional = true }

src/bin/gifski.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ fn check_if_paths_exist(paths: &[PathBuf]) -> BinResult<()> {
353353
for path in paths {
354354
if !path.exists() {
355355
let mut msg = format!("Unable to find the input file: \"{}\"", path.display());
356-
if path.to_str().map_or(false, |p| p.contains('*')) {
357-
msg += "\nThe \"*\" character was in quotes, which disabled pattern matching. The file with an actual literal asterisk in its name obviously doesn't exist.\nTo search for all files matching a pattern, use * without quotes.";
356+
if path.to_str().map_or(false, |p| p.contains(['*','?','['])) {
357+
msg += "\nThe pattern did not match any files.";
358358
} else if path.extension() == Some("gif".as_ref()) {
359359
msg = format!("Did you mean to use -o \"{}\" to specify it as the output file instead?", path.display());
360360
} else if path.is_relative() {

0 commit comments

Comments
 (0)