tool copydlldeps.py: function is_pe_file() must not fail on directories

pull/530/head
Martin Müllenhaupt 10 years ago
parent 089b5b926b
commit b29e9c72a9

@ -23,6 +23,8 @@ import struct
import sys
def is_pe_file(file):
if not os.path.isfile(file): # Skip directories
return False
f = open(file, 'rb')
if f.read(2) != b'MZ':
return False # DOS magic number not present

Loading…
Cancel
Save