This file is indexed.

/usr/share/tdiary/exifparser/makernote/prove.rb is in tdiary-contrib 3.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
#
#    exifparser/makernote/prove.rb -
#
#   Copyright (C) 2002 Ryuichi Tamura (r-tam@fsinet.or.jp)
#
#   $Revision: 1.1.1.1 $
#   $Date: 2002/12/16 07:59:00 $
#
require 'exifparser/makernote/fujifilm'
require 'exifparser/makernote/olympus'
require 'exifparser/makernote/canon'
require 'exifparser/makernote/nikon'
require 'exifparser/makernote/nikon2'
require 'exifparser/makernote/minolta'
require 'exifparser/makernote/sigma'

module Exif

  module MakerNote

    class NotSupportedError < RuntimeError; end

    module_function

    def prove(data, tag_make=nil, tag_model=nil)

      make = tag_make == nil ? '' : tag_make.to_s.upcase
      model = tag_model == nil ? '' : tag_model.to_s.upcase

      #
      # Identifier for OLYMPUS
      #
      if data[0..5] == "OLYMP\000"
        return Olympus
      #
      # Identifier for FUJIFILM
      #
      elsif data[0..7] == "FUJIFILM"
        return Fujifilm

      #
      # Identifier for Nikon
      #

      elsif make[0..4] == 'NIKON'
        if data[0..5] == "Nikon\000"
          if data[6] == 0x01 && data[7] == 0x00
            return Nikon
          end
        end
        return Nikon2

      #
      # Canon
      #
      elsif make[0..4] == 'CANON'
        return Canon

      #
      # Minolta
      #
      elsif make[0..6] == 'MINOLTA'
        return Minolta

      #
      # Sigma
      #
      elsif make[0..4] == 'SIGMA'
        return Sigma

      end

      #
      # If none above is applied, raises exception,
      # which will be caught by caller's rescue statement.
      #
      raise NotSupportedError
    end
    module_function :prove

  end

end