Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/olpc/datastore/backingstore.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/olpc/datastore/backingstore.py b/src/olpc/datastore/backingstore.py
index e900649..1af0088 100644
--- a/src/olpc/datastore/backingstore.py
+++ b/src/olpc/datastore/backingstore.py
@@ -410,14 +410,13 @@ class FileBackingStore(BackingStore):
if e.errno != errno.EPERM:
raise
- # Try to link from the original file to the targetpath. This can fail if
- # the file is in a different filesystem. Do a copy instead.
+ # Try to hard link from the original file to the targetpath. This can
+ # fail if the file is in a different filesystem. Do a symlink instead.
try:
os.link(path, targetpath)
except OSError, e:
if e.errno == errno.EXDEV:
- shutil.copy(path, targetpath)
- os.chmod(targetpath, 0604)
+ os.symlink(path, targetpath)
else:
raise