mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:43:40 +02:00
Sigh
This commit is contained in:
parent
1ca3b13a6c
commit
e42140cdc9
1 changed files with 5 additions and 0 deletions
|
|
@ -341,6 +341,11 @@ def close_handles(self):
|
|||
def delete_originals(self):
|
||||
import win32file
|
||||
for path in self.handle_map.iterkeys():
|
||||
try:
|
||||
# Ensure the file is not read-only
|
||||
win32file.SetFileAttributes(path, win32file.FILE_ATTRIBUTE_NORMAL)
|
||||
except:
|
||||
pass
|
||||
win32file.DeleteFile(path)
|
||||
self.close_handles()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue