mirror of
https://github.com/vbatts/freezing-octo-hipster.git
synced 2024-11-23 23:45:40 +00:00
manage-pictures: add note to switch EXIF libraries
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
06d43c4356
commit
9b138c2af3
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,8 @@ import (
|
|||
"github.com/rwcarlsen/goexif/mknote"
|
||||
)
|
||||
|
||||
// TODO switch to https://github.com/dsoprea/go-exif
|
||||
|
||||
var (
|
||||
flPicturePath = flag.String("p", filepath.Join(os.Getenv("HOME"), "Pictures"), "Base path for pictures to be stored")
|
||||
flPathFormat = flag.String("f", "2006/01", "formatting for picture path")
|
||||
|
@ -75,6 +77,12 @@ func (ps PictureStore) Dest(path string) (string, error) {
|
|||
}
|
||||
defer fh.Close()
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Printf("WARN: panic recover in ps.Dest: %s", r)
|
||||
}
|
||||
}()
|
||||
|
||||
x, err := exif.Decode(fh)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
Loading…
Reference in a new issue