diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-07-22 09:54:12 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-07-22 09:54:12 (GMT) |
commit | d7e0e22f4979a0e4baf2d3124833e65f5184f4de (patch) | |
tree | a52f078fc87ffeeab7cee4109c4adbb312506bb7 /src/sugar/bundle/activitybundle.py | |
parent | 525346ed4305fc6e5646147243055d5004191686 (diff) |
update mime type db when a new activity is copied to ~/Activities #955
Diffstat (limited to 'src/sugar/bundle/activitybundle.py')
-rw-r--r-- | src/sugar/bundle/activitybundle.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index 8f85098..7877229 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -325,6 +325,13 @@ class ActivityBundle(Bundle): else: logging.warning(err) + self.install_mime_type(install_path) + + return install_path + + def install_mime_type(self, install_path): + ''' Update the mime type database and install the mime type icon + ''' xdg_data_home = os.getenv('XDG_DATA_HOME', os.path.expanduser('~/.local/share')) @@ -360,7 +367,6 @@ class ActivityBundle(Bundle): os.symlink(info_file, os.path.join(installed_icons_dir, os.path.basename(info_file))) - return install_path def uninstall(self, install_path, force=False): if os.path.islink(install_path): |