Browse Source

add if isfile() to get_hash()

5.0
Glenn Jocher 4 years ago
parent
commit
59beae98e8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py View File

@@ -28,7 +28,7 @@ for orientation in ExifTags.TAGS.keys():

def get_hash(files):
# Returns a single hash value of a list of files
return sum(os.path.getsize(f) for f in files)
return sum(os.path.getsize(f) for f in files if os.path.isfile(f))


def exif_size(img):

Loading…
Cancel
Save