Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readactivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'readactivity.py')
-rw-r--r--readactivity.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/readactivity.py b/readactivity.py
index bf5cc6a..76182ed 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -734,7 +734,13 @@ class ReadActivity(activity.Activity):
# enable collaboration
self.activity_button.page.share.props.sensitive = True
- self._load_document('file://' + file_path)
+ # we need copy the file to a new place, the file_path disappear
+ extension = os.path.splitext(file_path)[1]
+ tempfile = os.path.join(self.get_activity_root(), 'instance',
+ 'tmp%i%s' % (time.time(), extension))
+ os.link(file_path, tempfile)
+
+ self._load_document('file://' + tempfile)
# FIXME: This should obviously be fixed properly
GObject.timeout_add_seconds(