Commit 4ff4a02
oiiotool: better handling of wildcards that match no files (AcademySoftwareFoundation#4627)
When you use frame or view wildcards, for example:
oiiotool foo.%04d.tif -o bar.%04d.exr
we noticed that if NO files matched, no iteration would occur. You would
get this output:
```
$ oiiotool foo.%04d.tif -o bar.%04d.exr
oiiotool WARNING : oiiotool produced no output. Did you forget -o?
```
But maybe this is not helpful and it should be some kind of error to ask
for a match and not get one? Or at least give a more clear explanation
of what happened.
This PR detects the case where there is no match of the wildcard at all,
warns about that, and then tries interpreting the command line literally
(no wildcard expansion). So now the output is
```
$ oiiotool foo.%04d.tif -o bar.%04d.exr
oiiotool WARNING : No frame number or views matched the wildcards
oiiotool ERROR: read : File does not exist: "foo.%04d.tif"
Full command line was:
> oiiotool foo.%04d.tif -o bar.%04d.exr
```
Closes AcademySoftwareFoundation#4623
Signed-off-by: Larry Gritz <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>1 parent ffc3a12 commit 4ff4a02
File tree
2 files changed
+10
-1
lines changed- src/oiiotool
- testsuite/oiiotool-control/ref
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7329 | 7329 | | |
7330 | 7330 | | |
7331 | 7331 | | |
| 7332 | + | |
| 7333 | + | |
| 7334 | + | |
| 7335 | + | |
| 7336 | + | |
| 7337 | + | |
7332 | 7338 | | |
7333 | 7339 | | |
7334 | 7340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
0 commit comments