Skip to content

Commit f8d1dc2

Browse files
committed
Fix shutil error + version bump
1 parent 9cff6ed commit f8d1dc2

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<addon id="script.module.xbmcswift2" name="xbmcswift2" provider-name="Jonathan Beluch (jbel), enen92" version="2.5.0">
1+
<addon id="script.module.xbmcswift2" name="xbmcswift2" provider-name="Jonathan Beluch (jbel), enen92" version="2.5.1">
22
<requires>
33
<import addon="xbmc.python" version="2.14.0" />
44
</requires>

changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
CHANGES
22
=======
3+
Version 2.5.1 (9/2/2020)
4+
- Fix shutil error when moving cache file
35

46
Version 2.5.0 (4/12/2019)
57
-------------

lib/xbmcswift2/storage.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def sync(self):
6060
raise
6161
finally:
6262
fileobj.close()
63+
64+
# shutil error (SameFileError when performing copyfile)
65+
if os.path.exists(self.filename):
66+
os.remove(self.filename)
67+
6368
shutil.move(tempname, self.filename) # atomic commit
6469
if self.mode is not None:
6570
os.chmod(self.filename, self.mode)

0 commit comments

Comments
 (0)