andrewning / sortphotos

SortPhotos is a Python script that organizes photos and videos into folders using date/time information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bails out when file names starts with ._

rvishureddy opened this issue · comments

[1/2213]
Source: /Volumes/iPhotos/iPhotoAlbums/Duplicates/IMG_0053 (1).jpg
Date/Time: 2009-01-31 04:48:04
Corresponding Tags: File:FileInodeChangeDate, File:FileModifyDate
Destination (move): /Volumes/iPhotos/Test/2009/01-Jan/IMG_0053 (1).jpg

[2/2213]
Source: /Volumes/iPhotos/iPhotoAlbums/Duplicates/._IMG_0053 (1).jpg
Date/Time: 2015-06-14 17:10:12
Corresponding Tags: File:FileInodeChangeDate, File:FileModifyDate
Destination (move): /Volumes/iPhotos/Test/2015/06-Jun/._IMG_0053 (1).jpg
Traceback (most recent call last):
File "sortphotos.py", line 476, in
main()
File "sortphotos.py", line 473, in main
args.use_only_tags, not args.silent)
File "sortphotos.py", line 409, in sortPhotos
shutil.move(src_file, dest_file)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 301, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: u'/Volumes/iPhotos/iPhotoAlbums/Duplicates/._IMG_0053 (1).jpg'

fixed with cb41d11