diff options
author | flavio <fdanesse@gmail.com> | 2012-12-05 11:50:54 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-12-05 11:50:54 (GMT) |
commit | 1b155ec4dc011ed325ec82d44754074e9a40f21a (patch) | |
tree | a4a8901d821d0e5d64d70297bf18a2e71875d5dc | |
parent | 9ff162a226d924d8f1f98005f389054b8a2eb710 (diff) |
Proper implementation of the path where you obtained the videotape.
-rw-r--r-- | ScreencastActivity.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ScreencastActivity.py b/ScreencastActivity.py index 767c505..6b7543b 100644 --- a/ScreencastActivity.py +++ b/ScreencastActivity.py @@ -31,7 +31,7 @@ import sc_gst import os # bundlepath -from sugar.activity.activity import get_bundle_path +from sugar.activity.activity import get_activity_root # datetime for journal entry name import datetime @@ -57,10 +57,11 @@ class ScreencastActivity(activity.Activity): self._ui = sc_ui.ScreencastUserInterface(self) # Set video file - if not os.path.exists(get_bundle_path() + "/data"): - os.makedirs(get_bundle_path() + "/data") + directory = os.path.join(get_activity_root(), "data") + if not os.path.exists(directory): + os.makedir(directory) - self._videofile = os.path.join( get_bundle_path(), "data", "screencast.ogg" ) + self._videofile = os.path.join( directory, "screencast.ogg" ) # Gstreamer interface object self._gst = sc_gst.ScreencastGstreamer(self, self._videofile) |