mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix an error when adding files from clipboard and file is of unknown type
This commit is contained in:
parent
ced7df0b20
commit
06755d5eba
@ -127,7 +127,7 @@ class AddAction(InterfaceAction):
|
||||
path = url.toLocalFile()
|
||||
if os.access(path, os.R_OK):
|
||||
mt = guess_type(path)[0]
|
||||
if mt.startswith('image/'):
|
||||
if mt and mt.startswith('image/'):
|
||||
images.append(path)
|
||||
else:
|
||||
files_to_add.append(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user