mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 11:14:53 +01:00
Fix an error when adding files from clipboard and file is of unknown type
This commit is contained in:
parent
ced7df0b20
commit
06755d5eba
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ def add_formats_from_clipboard(self):
|
|||
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…
Reference in a new issue