aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-06-14 01:00:10 +0530
committerArun Isaac2017-06-14 01:00:10 +0530
commit29ea037677bb5b9a2d0e4f50f275feca605bc516 (patch)
tree9f05d25c193522f4f02a11f88d41d27263d8a517
parent79444ebf1812ecb4914bde18ef2452c0506419d3 (diff)
downloadexiftool.el-29ea037677bb5b9a2d0e4f50f275feca605bc516.tar.gz
exiftool.el-29ea037677bb5b9a2d0e4f50f275feca605bc516.tar.lz
exiftool.el-29ea037677bb5b9a2d0e4f50f275feca605bc516.zip
Handle literal "-" tag values.
* exiftool.el (exiftool-read): If exiftool returns "-" as tag value with the "-f" flag, call exiftool again without the "-f" flag to ascertain whether the tag is absent or the value is a literal "-".
-rw-r--r--exiftool.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/exiftool.el b/exiftool.el
index e477ed9..06c056e 100644
--- a/exiftool.el
+++ b/exiftool.el
@@ -89,7 +89,10 @@ value. If no TAGS are specified, read all tags from FILE.
(string-match "\\([^:]*\\): \\(.*\\)" line)
(let ((tag (match-string 1 line))
(value (match-string 2 line)))
- (cons tag (if (equal value "-") "" value))))
+ (cons tag (if (equal value "-")
+ (exiftool-command "-s" "-s" "-s"
+ (format "-%s" tag) file)
+ value))))
(split-string
(apply 'exiftool-command
"-s" "-s" "-f"