diff options
author | Simon Schampijer <simon@schampijer.de> | 2009-03-02 14:21:15 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2009-03-02 14:21:15 (GMT) |
commit | e27be4e4165163d81533d7202d89c600900eeb33 (patch) | |
tree | 8f1e2dfb97fc3feda96d4768b86b96306d9a9df1 /src | |
parent | 2b2c2ef3085fd7f5a669d7f960f7a69158ba31a1 (diff) | |
parent | d22b52434bc37d8f921a4f5de8018bc9962a1105 (diff) |
Merge branch 'master' of gitorious@git.sugarlabs.org:sugar-toolkit/mainline
Diffstat (limited to 'src')
-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 eb35307..268576e 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -251,7 +251,7 @@ class ActivityBundle(Bundle): return os.path.join(self._path, icon_path) else: icon_data = self.get_file(icon_path).read() - temp_file, temp_file_path = tempfile.mkstemp(self._icon) + temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, suffix='.svg') os.write(temp_file, icon_data) os.close(temp_file) return util.TempFilePath(temp_file_path) @@ -350,6 +350,12 @@ class ActivityBundle(Bundle): return install_path def uninstall(self, install_path, force=False): + if os.path.islink(install_path): + # Don't remove the actual activity dir if it's a symbolic link + # because we may be removing user data. + os.unlink(install_path) + return + xdg_data_home = os.getenv('XDG_DATA_HOME', os.path.expanduser('~/.local/share')) |