mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:04:45 +02: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
1 changed files with 3 additions and 1 deletions
|
|
@ -1111,7 +1111,9 @@ def rmtree(self, path):
|
|||
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…
Reference in a new issue