summaryrefslogtreecommitdiff
path: root/giscanner/cachestore.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/cachestore.py')
-rw-r--r--giscanner/cachestore.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
index f7f0062a..5c4b5b49 100644
--- a/giscanner/cachestore.py
+++ b/giscanner/cachestore.py
@@ -22,6 +22,7 @@ import errno
import cPickle
import hashlib
import os
+import shutil
import tempfile
@@ -105,8 +106,8 @@ class CacheStore(object):
raise
try:
- os.rename(tmp_filename, store_filename)
- except OSError, e:
+ shutil.move(tmp_filename, store_filename)
+ except IOError, e:
# Permission denied
if e.errno == errno.EACCES:
self._remove_filename(tmp_filename)