mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When deleting a folder in the library and the folder has already been deleted do not fail
This commit is contained in:
parent
22e9cbfa37
commit
37349f1e56
@ -1111,7 +1111,9 @@ class DB(object):
|
||||
if self.is_deletable(path):
|
||||
try:
|
||||
shutil.rmtree(path)
|
||||
except:
|
||||
except EnvironmentError as e:
|
||||
if e.errno == errno.ENOENT and not os.path.exists(path):
|
||||
return
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
time.sleep(1) # In case something has temporarily locked a file
|
||||
|
Loading…
x
Reference in New Issue
Block a user