1
0
mirror of https://github.com/ciromattia/kcc synced 2026-06-06 22:53:30 +00:00

Yet another workaround for file lock problems (#125)

This commit is contained in:
Paweł Jastrzębski
2015-01-24 10:07:27 +01:00
parent c62eeeb712
commit ad3ff35aaa
3 changed files with 19 additions and 6 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ try:
from PyQt5 import QtCore
except ImportError:
QtCore = None
from .shared import md5Checksum, getImageFileName, walkLevel
from .shared import md5Checksum, getImageFileName, walkLevel, saferReplace
from . import comic2panel
from . import image
from . import cbxarchive
@@ -718,7 +718,7 @@ def sanitizeTree(filetree):
newKey = os.path.join(root, slugified + splitname[1])
key = os.path.join(root, name)
if key != newKey:
os.replace(key, newKey)
saferReplace(key, newKey)
for name in dirs:
tmpName = name
slugified = slugify(name)
@@ -728,7 +728,7 @@ def sanitizeTree(filetree):
newKey = os.path.join(root, slugified)
key = os.path.join(root, name)
if key != newKey:
os.replace(key, newKey)
saferReplace(key, newKey)
return chapterNames
@@ -747,7 +747,7 @@ def sanitizeTreeKobo(filetree):
newKey = os.path.join(root, slugified + splitname[1])
key = os.path.join(root, name)
if key != newKey:
os.replace(key, newKey)
saferReplace(key, newKey)
def sanitizePermissions(filetree):