Skip to content

Commit

Permalink
chore(BinaryExtractionTask): add note to future me about -W vs -w and…
Browse files Browse the repository at this point in the history
… -out
  • Loading branch information
mceachen committed Jan 30, 2025
1 parent 2d9caf4 commit b84234f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/BinaryExtractionTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ export class BinaryExtractionTask extends ExifToolTask<Maybe<string>> {
...Utf8FilenameCharsetArgs,
"-b", // -binary
"-" + tagname,
// capital W allows destination files to not have a pattern:
// Capital W allows destination files to not have a pattern. See
// https://exiftool.org/exiftool_pod.html#W-FMT--tagOut
//
// Prior code used -w with %0f "to avoid shell expansion", but as this
// command gets sent directly to exiftool thanks to stay_open mode, we
// don't need to worry about shell expansion.
//
// I also tried `-out` instead of `-W`, and that didn't work at least on
// ExifTool 13.17.
forceWrite ? "-W!" : "-W",
path.resolve(imgDest),
path.resolve(imgSrc),
Expand Down

0 comments on commit b84234f

Please sign in to comment.