mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-22 05:51:10 +00:00
Fixed fcache issue when moving cache file between disks.
This commit is contained in:
parent
7720d000de
commit
37059e7fbd
2 changed files with 4 additions and 4 deletions
|
@ -92,13 +92,13 @@ if os.name == 'nt': # pragma: no cover
|
|||
return
|
||||
# Fall back to "move away and replace"
|
||||
try:
|
||||
os.rename(src, dst)
|
||||
shutil.move(src, dst)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
old = "%s-%08x" % (dst, random.randint(0, sys.maxint))
|
||||
os.rename(dst, old)
|
||||
os.rename(src, dst)
|
||||
shutil.move(dst, old)
|
||||
shutil.move(src, dst)
|
||||
try:
|
||||
os.unlink(old)
|
||||
except Exception:
|
||||
|
|
|
@ -128,7 +128,7 @@ webencodings==0.5.1
|
|||
|
||||
# Required-by: subzero
|
||||
backports.functools-lru-cache==1.6.4
|
||||
fcache==0.4.7 # https://github.com/tsroten/fcache/pull/34
|
||||
fcache==0.4.7 # https://github.com/tsroten/fcache/pull/34 and 35
|
||||
json_tricks==3.16.1
|
||||
tld==0.12.6 # https://github.com/barseghyanartur/tld/pull/119
|
||||
|
||||
|
|
Loading…
Reference in a new issue