mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Sigh
This commit is contained in:
parent
1ca3b13a6c
commit
e42140cdc9
@ -341,6 +341,11 @@ class WindowsAtomicFolderMove(object):
|
|||||||
def delete_originals(self):
|
def delete_originals(self):
|
||||||
import win32file
|
import win32file
|
||||||
for path in self.handle_map.iterkeys():
|
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)
|
win32file.DeleteFile(path)
|
||||||
self.close_handles()
|
self.close_handles()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user