mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1062486 (Unhandled exception configuring MTP device)
This commit is contained in:
parent
32fd2bfbf2
commit
f62c31fd44
@ -146,7 +146,7 @@ class SendToConfig(QWidget): # {{{
|
||||
def browse(self):
|
||||
b = Browser(self.device.filesystem_cache, show_files=False,
|
||||
parent=self)
|
||||
if b.exec_() == b.Accepted:
|
||||
if b.exec_() == b.Accepted and b.current_item is not None:
|
||||
sid, path = b.current_item
|
||||
self.t.setText('/'.join(path[1:]))
|
||||
|
||||
@ -250,7 +250,7 @@ class Rule(QWidget):
|
||||
def browse(self):
|
||||
b = Browser(self.device.filesystem_cache, show_files=False,
|
||||
parent=self)
|
||||
if b.exec_() == b.Accepted:
|
||||
if b.exec_() == b.Accepted and b.current_item is not None:
|
||||
sid, path = b.current_item
|
||||
self.folder.setText('/'.join(path[1:]))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user